@kelvininc/ui-components
Version:
Kelvin UI Components
24 lines (23 loc) • 778 B
TypeScript
import { StyleMode, UIComponentsConfig } from '../types';
export declare const initialize: (userConfig?: UIComponentsConfig) => void;
/**
* Dynamically sets the theme mode without requiring a page refresh.
* This updates the mode attribute on the body element, which triggers
* CSS custom properties to update across all components.
*
* @param mode - The StyleMode to set ('night' or 'light')
*/
export declare const setThemeMode: (mode: StyleMode) => void;
/**
* Gets the current theme mode.
*
* @returns The current StyleMode
*/
export declare const getThemeMode: () => StyleMode;
/**
* Toggles between light and dark theme modes.
*
* @returns The new StyleMode after toggling
*/
export declare const toggleThemeMode: () => StyleMode;
export default initialize;