Files
workspace/code/app/app-rn3/store/app.ts
T
2026-04-08 21:28:52 +08:00

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 }),
}));