Skip to content

Commit

Permalink
fix: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
yue4u committed Oct 7, 2024
1 parent dd11de9 commit 6a7a273
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/styled/src/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ export const useTheme = (localStorageKey: string = LOCAL_STORAGE_KEY) => {
assertKeyString(localStorageKey)
const isDark = useMedia('(prefers-color-scheme: dark)')
const media = isDark !== undefined ? (isDark ? 'dark' : 'light') : undefined
const [local, setTheme, ready] = useLocalStorage<typeof media>(localStorageKey)
const [local, setTheme, ready] =
useLocalStorage<typeof media>(localStorageKey)
const theme = !ready || media === undefined ? undefined : local ?? media
const system = local === undefined
return [theme, setTheme, system] as const
Expand Down

0 comments on commit 6a7a273

Please sign in to comment.