Raphaël Bosi
2025-04-10 11:29:45 +02:00
committed by GitHub
parent a7e6564017
commit 4a4ce9a6fe

View File

@ -118,31 +118,30 @@ export const PageHeaderToggleCommandMenuButton = () => {
const theme = useTheme(); const theme = useTheme();
return ( return (
<div> <StyledButtonWrapper>
<StyledButtonWrapper> <div id="toggle-command-menu-button">
<div id="toggle-command-menu-button"> <AnimatedButton
<AnimatedButton animatedSvg={
animatedSvg={ <AnimatedIcon isCommandMenuOpened={isCommandMenuOpened} />
<AnimatedIcon isCommandMenuOpened={isCommandMenuOpened} /> }
} className="page-header-command-menu-button"
className="page-header-command-menu-button" dataTestId="page-header-command-menu-button"
dataTestId="page-header-command-menu-button" size={isMobile ? 'medium' : 'small'}
size={isMobile ? 'medium' : 'small'} variant="secondary"
variant="secondary" accent="default"
accent="default" hotkeys={[getOsControlSymbol(), 'K']}
hotkeys={[getOsControlSymbol(), 'K']} ariaLabel={ariaLabel}
ariaLabel={ariaLabel} onClick={toggleCommandMenu}
onClick={toggleCommandMenu} animate={{
animate={{ rotate: isCommandMenuOpened ? 90 : 0,
rotate: isCommandMenuOpened ? 90 : 0, }}
}} transition={{
transition={{ duration: theme.animation.duration.normal,
duration: theme.animation.duration.normal, ease: 'easeInOut',
ease: 'easeInOut', }}
}} />
/> </div>
</div>
</StyledButtonWrapper>
<StyledTooltipWrapper> <StyledTooltipWrapper>
<AppTooltip <AppTooltip
anchorSelect="#toggle-command-menu-button" anchorSelect="#toggle-command-menu-button"
@ -153,6 +152,6 @@ export const PageHeaderToggleCommandMenuButton = () => {
noArrow noArrow
/> />
</StyledTooltipWrapper> </StyledTooltipWrapper>
</div> </StyledButtonWrapper>
); );
}; };