fix: use text state

This commit is contained in:
2026-02-05 23:06:39 +05:00
parent 1b8a035708
commit 60b577b6df
7 changed files with 31 additions and 15 deletions
+16
View File
@@ -0,0 +1,16 @@
export type Theme = "dark" | "light";
function createThemeState() {
let current: Theme = $state("dark");
return {
get theme() {
return current;
},
toggle() {
current = current === "dark" ? "light" : "dark";
},
};
}
export const themeState = createThemeState();