@ducor/react
Version:
admin template ui interface
20 lines (19 loc) • 674 B
TypeScript
/**
* Return type for the useThemeMode hook.
*/
export type useThemeModeReturn = {
internalThemeMode: "light" | "dark";
THEME_MODES: ("light" | "dark" | "system")[];
isDark: boolean;
currentMode: "light" | "dark" | "system";
setThemeMode: (themeMode: "light" | "dark" | "system") => void;
toggleThemeMode: () => void;
};
/**
* Custom hook to manage theme mode.
*
* @returns {useThemeModeReturn} An object containing theme mode information and functions to change the theme mode.
* @throws Will throw an error if the hook is used outside of a ThemeProvider.
*/
declare const useThemeMode: () => useThemeModeReturn;
export default useThemeMode;