react18-themes
Version:
Unleash the Power of React Server Components! Use multiple themes on your site with confidence, without losing any advantages of React Server Components.
22 lines (21 loc) • 784 B
TypeScript
import { ColorSchemeType, ResolvedColorSchemeType } from "./types";
export interface ThemeStoreType {
/** theme */
t: string;
/** darkTheme */
d: string;
/** lightTheme */
l: string;
/** colorSchemePref */
c: ColorSchemeType;
/** systemColorScheme */
s: ResolvedColorSchemeType;
}
export declare const initialState: ThemeStoreType;
/** internal store */
export declare const useThemeStore: (targetSelector?: string) => [ThemeStoreType, import("r18gs").SetStateAction<ThemeStoreType>];
export interface ForcedStoreType {
/** forced theme */ f?: string;
/** forced colorScheme */ fc?: ColorSchemeType;
}
export declare const useForcedStore: (targetSelector?: string) => [ForcedStoreType, import("r18gs").SetStateAction<ForcedStoreType>];