Skip to content

Commit 704ead9

Browse files
committed
feat(web): change icons for event migration buttons
resolves feedback for #574 (comment)
1 parent 9123a0a commit 704ead9

File tree

3 files changed

+59
-10
lines changed

3 files changed

+59
-10
lines changed

packages/web/src/views/Forms/EventForm/MigrateBackwardButton.tsx

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
import React from "react";
2+
import styled from "styled-components";
23
import { ArrowLeft } from "@phosphor-icons/react";
34
import { getMetaKey } from "@web/common/utils/shortcut.util";
45
import { Text } from "@web/components/Text";
56
import TooltipIconButton from "@web/components/TooltipIconButton/TooltipIconButton";
67

8+
const StyledMigrateBackwardButton = styled.div`
9+
font-size: 25px;
10+
&:hover {
11+
cursor: pointer;
12+
}
13+
`;
14+
15+
const StyledArrowLeft = styled(ArrowLeft)`
16+
width: 15px;
17+
height: 15px;
18+
`;
19+
720
export const MigrateBackwardButton = ({
821
onClick,
922
tooltipText = "Migrate Backward",
@@ -13,14 +26,18 @@ export const MigrateBackwardButton = ({
1326
}) => {
1427
return (
1528
<TooltipIconButton
16-
icon={<ArrowLeft id="migrate-backward-button" />}
29+
component={
30+
<StyledMigrateBackwardButton id="migrate-backward-button" role="button">
31+
{"<"}
32+
</StyledMigrateBackwardButton>
33+
}
1734
buttonProps={{ "aria-label": tooltipText }}
1835
tooltipProps={{
1936
description: tooltipText,
2037
onClick,
2138
shortcut: (
2239
<Text size="s" style={{ display: "flex", alignItems: "center" }}>
23-
CTRL + {getMetaKey()} + Left
40+
CTRL + {getMetaKey()} + <StyledArrowLeft />
2441
</Text>
2542
),
2643
}}

packages/web/src/views/Forms/EventForm/MigrateForwardButton.tsx

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
import React from "react";
2+
import styled from "styled-components";
23
import { ArrowRight } from "@phosphor-icons/react";
34
import { getMetaKey } from "@web/common/utils/shortcut.util";
45
import { Text } from "@web/components/Text";
56
import TooltipIconButton from "@web/components/TooltipIconButton/TooltipIconButton";
67

8+
const StyledMigrateForwardButton = styled.div`
9+
font-size: 25px;
10+
&:hover {
11+
cursor: pointer;
12+
}
13+
`;
14+
15+
const StyledArrowRight = styled(ArrowRight)`
16+
width: 15px;
17+
height: 15px;
18+
`;
19+
720
export const MigrateForwardButton = ({
821
onClick,
922
tooltipText = "Migrate Forward",
@@ -13,14 +26,18 @@ export const MigrateForwardButton = ({
1326
}) => {
1427
return (
1528
<TooltipIconButton
16-
icon={<ArrowRight id="migrate-forward-button" />}
29+
component={
30+
<StyledMigrateForwardButton id="migrate-forward-button" role="button">
31+
{">"}
32+
</StyledMigrateForwardButton>
33+
}
1734
buttonProps={{ "aria-label": tooltipText }}
1835
tooltipProps={{
1936
description: tooltipText,
2037
onClick,
2138
shortcut: (
2239
<Text size="s" style={{ display: "flex", alignItems: "center" }}>
23-
CTRL + {getMetaKey()} + Right
40+
CTRL + {getMetaKey()} + <StyledArrowRight />
2441
</Text>
2542
),
2643
}}

packages/web/src/views/Forms/EventForm/MoveToSidebarButton.tsx

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,43 @@
11
import React from "react";
2+
import styled from "styled-components";
23
import { ArrowLeft } from "@phosphor-icons/react";
34
import { getMetaKey } from "@web/common/utils/shortcut.util";
45
import { Text } from "@web/components/Text";
56
import TooltipIconButton from "@web/components/TooltipIconButton/TooltipIconButton";
67

8+
const StyledMoveToSidebarButton = styled.div`
9+
font-size: 25px;
10+
&:hover {
11+
cursor: pointer;
12+
}
13+
`;
14+
15+
const StyledArrowLeft = styled(ArrowLeft)`
16+
width: 15px;
17+
height: 15px;
18+
`;
19+
720
export const MoveToSidebarButton = ({
821
onClick,
9-
tooltipText = "Migrate Backward",
10-
size = undefined,
22+
tooltipText = "Move To Sidebar",
1123
}: {
1224
onClick: () => void;
13-
tooltipText: string;
14-
size?: number;
25+
tooltipText?: string;
1526
}) => {
1627
return (
1728
<TooltipIconButton
18-
icon={<ArrowLeft id="migrate-backward-button" size={size} />}
29+
component={
30+
<StyledMoveToSidebarButton id="migrate-backward-button" role="button">
31+
{"<"}
32+
</StyledMoveToSidebarButton>
33+
}
1934
buttonProps={{ "aria-label": tooltipText }}
2035
tooltipProps={{
2136
description: tooltipText,
2237
onClick,
2338
shortcut: (
2439
<Text size="s" style={{ display: "flex", alignItems: "center" }}>
25-
CTRL + {getMetaKey()} + Left
40+
CTRL + {getMetaKey()} + <StyledArrowLeft />
2641
</Text>
2742
),
2843
}}

0 commit comments

Comments
 (0)