14 lines
335 B
TypeScript
14 lines
335 B
TypeScript
import { create } from "zustand";
|
|
|
|
export type ThemeScheme = "light" | "dark" | "system";
|
|
|
|
interface AppState {
|
|
themeScheme: ThemeScheme;
|
|
setThemeScheme: (theme: ThemeScheme) => void;
|
|
}
|
|
|
|
export const useAppStore = create<AppState>((set) => ({
|
|
themeScheme: "system",
|
|
setThemeScheme: (theme) => set({ themeScheme: theme }),
|
|
}));
|