2025-08-29 15:06:50 +00:00
|
|
|
import {preferencesStorageProvider} from "@src/lib/storage"
|
|
|
|
|
import {synced} from "@welshman/store"
|
2024-08-14 23:25:36 +00:00
|
|
|
|
2025-07-15 18:06:47 +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",
|
2025-08-29 15:06:50 +00:00
|
|
|
storage: preferencesStorageProvider,
|
2025-07-15 18:06:47 +00:00
|
|
|
})
|