Skip to content

Commit

Permalink
change placement of topbar elements tooltip to bottom-start (#757)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcotrim authored Dec 20, 2024
1 parent 325a87d commit 44ca2a2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/top-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,16 @@ interface TopBarProps {
onToggleSidebar: () => void;
}

const DEFAULT_TOOLTIP_PLACEMENT = 'bottom-start';

function ToggleSidebar( { onToggleSidebar }: TopBarProps ) {
return (
<div className="app-no-drag-region">
<Tooltip text={ __( 'Toggle sidebar' ) } className="h-6">
<Tooltip
text={ __( 'Toggle sidebar' ) }
className="h-6"
placement={ DEFAULT_TOOLTIP_PLACEMENT }
>
<Button onClick={ onToggleSidebar } variant="icon" aria-label={ __( 'Toggle sidebar' ) }>
<Icon className="text-white" icon={ drawerLeft } size={ 24 } />
</Button>
Expand All @@ -44,6 +50,7 @@ function OfflineIndicator() {
</span>
}
className="h-6"
placement={ DEFAULT_TOOLTIP_PLACEMENT }
>
<Button
aria-label={ __( 'Offline indicator' ) }
Expand Down

0 comments on commit 44ca2a2

Please sign in to comment.