File tree Expand file tree Collapse file tree 1 file changed +24
-18
lines changed
packages/web/src/views/Forms/EventForm Expand file tree Collapse file tree 1 file changed +24
-18
lines changed Original file line number Diff line number Diff line change 11import React from "react" ;
2+ import { ArrowLeft } from "@phosphor-icons/react" ;
23import { getMetaKey } from "@web/common/utils/shortcut.util" ;
34import { 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} ;
You can’t perform that action at this time.
0 commit comments