-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Expand file tree
/
Copy pathroot.tsx
More file actions
60 lines (55 loc) 路 1.85 KB
/
Copy pathroot.tsx
File metadata and controls
60 lines (55 loc) 路 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/**
* Copyright (c) 2023-present Plane Software, Inc. and contributors
* SPDX-License-Identifier: AGPL-3.0-only
* See the LICENSE file for details.
*/
import { observer } from "mobx-react";
// ui
import { Banner } from "@makeplane/propel/components/banner";
import { Button } from "@makeplane/propel/components/button";
import { MARKETING_PLANE_ONE_PAGE_LINK } from "@plane/constants";
import { useTranslation } from "@plane/i18n";
import { cn } from "@plane/utils";
// hooks
import { useMultipleSelectStore } from "@/hooks/store/use-multiple-select-store";
import type { TSelectionHelper } from "@/hooks/use-multiple-select";
type Props = {
className?: string;
selectionHelpers: TSelectionHelper;
};
export const IssueBulkOperationsRoot = observer(function IssueBulkOperationsRoot(props: Props) {
const { className, selectionHelpers } = props;
// translation
const { t } = useTranslation();
// store hooks
const { isSelectionActive } = useMultipleSelectStore();
if (!isSelectionActive || selectionHelpers.isSelectionDisabled) return null;
return (
<div className={cn("sticky bottom-0 left-0 z-[2] grid h-20 place-items-center px-3.5", className)}>
<Banner
placement="inline"
variant="accent"
icon={null}
title={t("bulk_operations.upgrade_banner.message")}
actions={
<Button
variant="primary"
size="sm"
stretch="auto"
label={t("bulk_operations.upgrade_banner.cta")}
nativeButton={false}
render={
<a
href={MARKETING_PLANE_ONE_PAGE_LINK}
target="_blank"
rel="noopener noreferrer"
aria-label={t("bulk_operations.upgrade_banner.cta")}
/>
}
/>
}
render={<div className="w-full" />}
/>
</div>
);
});