Skip to content

Commit 9123a0a

Browse files
committed
feat(web): update grid event form's move to sidebar button icon to be consistent with migrate buttons in someday event form
1 parent e5f1c66 commit 9123a0a

File tree

1 file changed

+24
-18
lines changed

1 file changed

+24
-18
lines changed
Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,31 @@
11
import React from "react";
2+
import { ArrowLeft } from "@phosphor-icons/react";
23
import { getMetaKey } from "@web/common/utils/shortcut.util";
34
import { Text } from "@web/components/Text";
4-
import { TooltipWrapper } from "@web/components/Tooltip/TooltipWrapper";
5-
import { StyledMigrateArrowInForm } from "@web/views/Calendar/components/Sidebar/SomedayTab/SomedayEvents/SomedayEventContainer/styled";
6-
7-
export const MoveToSidebarButton = ({ onClick }: { onClick: () => void }) => {
8-
const getShortcut = () => {
9-
return (
10-
<Text size="s" style={{ display: "flex", alignItems: "center" }}>
11-
{getMetaKey()} +{" SHIFT "} + {","}
12-
</Text>
13-
);
14-
};
5+
import TooltipIconButton from "@web/components/TooltipIconButton/TooltipIconButton";
156

7+
export const MoveToSidebarButton = ({
8+
onClick,
9+
tooltipText = "Migrate Backward",
10+
size = undefined,
11+
}: {
12+
onClick: () => void;
13+
tooltipText: string;
14+
size?: number;
15+
}) => {
1616
return (
17-
<TooltipWrapper
18-
onClick={onClick}
19-
description="Move to sidebar"
20-
shortcut={getShortcut()}
21-
>
22-
<StyledMigrateArrowInForm role="button">{"<"}</StyledMigrateArrowInForm>
23-
</TooltipWrapper>
17+
<TooltipIconButton
18+
icon={<ArrowLeft id="migrate-backward-button" size={size} />}
19+
buttonProps={{ "aria-label": tooltipText }}
20+
tooltipProps={{
21+
description: tooltipText,
22+
onClick,
23+
shortcut: (
24+
<Text size="s" style={{ display: "flex", alignItems: "center" }}>
25+
CTRL + {getMetaKey()} + Left
26+
</Text>
27+
),
28+
}}
29+
/>
2430
);
2531
};

0 commit comments

Comments
 (0)