UNPKG

@mayank1513/nthul

Version:

Unleash the Power of React Server Components! Use multiple themes on your site with confidence, without losing any advantages of React Server Components.

16 lines (15 loc) 813 B
export interface ThemeSwitcherProps { /** id of target element to apply classes to. This is useful when you want to apply theme only to specific container. */ targetId?: string; /** To stop persisting and syncing theme between tabs. */ dontSync?: boolean; /** force apply CSS transition property to all the elements during theme switching. E.g., `all .3s` */ themeTransition?: string; /** provide styles object imported from CSS/SCSS modules, if you are using CSS/SCSS modules. */ styles?: Record<string, string>; } /** * The core ThemeSwitcher component wich applies classes and transitions. * Cookies are set only if corresponding ServerTarget is detected. */ export declare const ThemeSwitcher: ({ targetId, dontSync, themeTransition, styles, }: ThemeSwitcherProps) => null;