@codegouvfr/react-dsfr
Version:
French State Design System React integration library
14 lines (13 loc) • 569 B
TypeScript
export type ColorScheme = "light" | "dark";
export type UseIsDark = () => {
isDark: boolean;
setIsDark: (isDark: boolean | "system" | ((currentIsDark: boolean) => boolean | "system")) => void;
};
export declare const useIsDarkClientSide: UseIsDark;
export declare function startClientSideIsDarkLogic(params: {
registerEffectAction: (action: () => void) => void;
doPersistDarkModePreferenceWithCookie: boolean;
colorSchemeExplicitlyProvidedAsParameter: ColorScheme | "system";
doCheckNonce: boolean;
trustedTypesPolicyName: string;
}): void;