flotilla/src/app/util/theme.ts

9 lines
282 B
TypeScript
Raw Normal View History

import {preferencesStorageProvider} from "@src/lib/storage"
import {synced} from "@welshman/store"
2024-08-14 23:25:36 +00:00
export const theme = synced({
key: "theme",
2025-09-11 21:47:06 +00:00
defaultValue: window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light",
storage: preferencesStorageProvider,
})