Skip to content

Commit

Permalink
♿️ Add label to menu button and remove unnecessary tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
wancup committed Oct 25, 2024
1 parent bc1d178 commit 587fa13
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions src/features/color-theme/components/color-theme-switcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,13 @@ export function ColorThemeSwitcher(): JSX.Element {
>
<Menu.Trigger
asChild={(triggerProps) => (
<Tooltip.Root openDelay={200}>
<Tooltip.Trigger>
<IconButton {...triggerProps()} variant="ghost" size="sm">
{match(theme())
.with("dark", () => <MoonIcon />)
.with("light", () => <SunIcon />)
.with("system", () => <SunMoonIcon />)
.exhaustive()}
</IconButton>
</Tooltip.Trigger>
<Tooltip.Positioner>
<Tooltip.Arrow>
<Tooltip.ArrowTip />
</Tooltip.Arrow>
<Tooltip.Content>Change color theme</Tooltip.Content>
</Tooltip.Positioner>
</Tooltip.Root>
<IconButton {...triggerProps()} variant="ghost" size="sm" aria-label="Change theme color">
{match(theme())
.with("dark", () => <MoonIcon />)
.with("light", () => <SunIcon />)
.with("system", () => <SunMoonIcon />)
.exhaustive()}
</IconButton>
)}
/>
<Menu.Positioner class={css({ marginRight: "16px" })}>
Expand Down

0 comments on commit 587fa13

Please sign in to comment.