UNPKG

416 BTypeScriptView Raw
1export declare enum ThemeMode {
2 LIGHT = "light",
3 DARK = "dark",
4 SYSTEM = "system"
5}
6export type ThemeModeType = `${ThemeMode}`;
7export type ThemeType = 'light' | 'dark';
8type Options = {
9 localStorageKey?: string;
10};
11export default function useTheme(options?: Options): {
12 theme: ThemeType;
13 themeMode: "dark" | "light" | "system";
14 setThemeMode: (mode: ThemeModeType) => void;
15};
16export {};