Skip to content

Commit 47f8875

Browse files
committed
feat(web): Add keyboard shortcuts to migrate backward/forward buttons in event form
1 parent ec7c9fc commit 47f8875

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import React from "react";
22
import styled from "styled-components";
3+
import { getMetaKey } from "@web/common/utils/shortcut.util";
4+
import { Text } from "@web/components/Text";
35
import TooltipIconButton from "@web/components/TooltipIconButton/TooltipIconButton";
46

57
const StyledMigrateBackwardButton = styled.div`
@@ -27,6 +29,11 @@ export const MigrateBackwardButton = ({
2729
tooltipProps={{
2830
description: tooltipText,
2931
onClick,
32+
shortcut: (
33+
<Text size="s" style={{ display: "flex", alignItems: "center" }}>
34+
Ctrl + {getMetaKey()} + Left
35+
</Text>
36+
),
3037
}}
3138
/>
3239
);

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import React from "react";
22
import styled from "styled-components";
3+
import { getMetaKey } from "@web/common/utils/shortcut.util";
4+
import { Text } from "@web/components/Text";
35
import TooltipIconButton from "@web/components/TooltipIconButton/TooltipIconButton";
46

57
const StyledMigrateForwardButton = styled.div`
@@ -27,6 +29,11 @@ export const MigrateForwardButton = ({
2729
tooltipProps={{
2830
description: tooltipText,
2931
onClick,
32+
shortcut: (
33+
<Text size="s" style={{ display: "flex", alignItems: "center" }}>
34+
Ctrl + {getMetaKey()} + Right
35+
</Text>
36+
),
3037
}}
3138
/>
3239
);

0 commit comments

Comments
 (0)