dark-mode-switcheroo
Version:
🌓 Simple CSS theme switching with saved preferences and automatic OS setting detection
13 lines (12 loc) • 382 B
TypeScript
export declare function init(options: {
toggle?: Element | null;
classes?: {
dark: string;
light: string;
};
default?: string;
storageKey?: string;
onInit?: (toggle?: Element | null) => unknown;
onUserToggle?: (toggle?: Element | null) => unknown;
onChange?: (theme: string, toggle?: Element | null) => unknown;
}): void;