UNPKG

nextjs-darkmode-lite

Version:

Unleash the Power of React Server Components! Use dark/light mode on your site with confidence, without losing any advantages of React Server Components

23 lines (22 loc) 692 B
export interface CoreProps { /** themeTransition: force apply CSS transition property to all the elements during theme switching. E.g., `all .3s` * @defaultValue 'none' */ t?: string; /** The nonce value for your Content Security Policy. @defaultValue '' */ nonce?: string; /** storageKey @defaultValue 'o' */ k?: string; } /** * The Core component wich applies classes and transitions. * Cookies are set only if corresponding ServerTarget is detected. * * @example * ```tsx * <Core [t="background-color .3s"]/> * ``` * * @source - Source code */ export declare const Core: ({ t, nonce, k }: CoreProps) => import("react/jsx-runtime").JSX.Element;