12 lines
251 B
TypeScript
12 lines
251 B
TypeScript
import { create } from "zustand";
|
|
|
|
interface AppState {
|
|
theme: "light" | "dark";
|
|
setTheme: (theme: "light" | "dark") => void;
|
|
}
|
|
|
|
export const useAppStore = create<AppState>((set) => ({
|
|
theme: "light",
|
|
setTheme: (theme) => set({ theme }),
|
|
}));
|