mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-15 16:20:03 +00:00
WIP: Theme switcher
- Light/Dark Toggle works - Theme Preview works - TODO: Theme switching
This commit is contained in:
@@ -1,18 +1,20 @@
|
||||
import {useAtom} from "jotai"
|
||||
import {atomWithStorage} from "jotai/utils"
|
||||
|
||||
import {Theme} from "Frontend/@/registry/themes"
|
||||
import {Theme} from "@/registry/themes"
|
||||
|
||||
type Config = {
|
||||
theme: Theme["name"]
|
||||
mode: "light" | "dark",
|
||||
radius: number
|
||||
theme: {
|
||||
name: Theme["name"],
|
||||
mode: "light" | "dark" | "system"
|
||||
}
|
||||
}
|
||||
|
||||
const configAtom = atomWithStorage<Config>("config", {
|
||||
theme: "zinc",
|
||||
mode: "light",
|
||||
radius: 0.5,
|
||||
theme: {
|
||||
name: "zinc",
|
||||
mode: "system"
|
||||
}
|
||||
})
|
||||
|
||||
export function useConfig() {
|
||||
|
||||
Reference in New Issue
Block a user