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.

27 lines (26 loc) 822 B
/// <reference types="react" /> interface ServerTargetProps { /** @defaultValue 'div' */ tag?: keyof JSX.IntrinsicElements; /** id of target element if you are applying theme only to specific container. * make sure you pass same targetId to corresponding `ThemeSwitcher`, `ColorSwitch` and `useTheme` hook as well. * @defaultValue undefined*/ targetId?: string; /** provide styles object if you are using CSS/SCSS modules. */ styles?: Record<string, string>; } /** * Server Side target for avoiding flash of un-themed content. * @example * ```tsx * <html> * ... * <body> * <ServerTarget /> * ... * </body> * </html> * ``` */ export declare const ServerTarget: ({ tag, targetId, styles }: ServerTargetProps) => import("react/jsx-runtime").JSX.Element; export {};