Skip to content

Commit

Permalink
fix arrow to extracted funcs in theme toggler
Browse files Browse the repository at this point in the history
  • Loading branch information
dEdmishka committed Jan 24, 2024
1 parent 1100dca commit 4fb34a1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/components/ui/theme-toggler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ import * as React from 'react'
export function ThemeToggler() {
const { setTheme } = useTheme()

const setLightTheme = () => setTheme('light')
const setDarkTheme = () => setTheme('dark')
const setSystemTheme = () => setTheme('system')

return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
Expand All @@ -24,13 +28,9 @@ export function ThemeToggler() {
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
<DropdownMenuItem onClick={() => setTheme('light')}>
Light
</DropdownMenuItem>
<DropdownMenuItem onClick={() => setTheme('dark')}>
Dark
</DropdownMenuItem>
<DropdownMenuItem onClick={() => setTheme('system')}>
<DropdownMenuItem onClick={() => setLightTheme}>Light</DropdownMenuItem>
<DropdownMenuItem onClick={() => setDarkTheme}>Dark</DropdownMenuItem>
<DropdownMenuItem onClick={() => setSystemTheme}>
System
</DropdownMenuItem>
</DropdownMenuContent>
Expand Down

0 comments on commit 4fb34a1

Please sign in to comment.