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.

29 lines (28 loc) 891 B
import { HTMLProps } from "react"; interface ColorSwitchProps extends HTMLProps<HTMLDivElement> { /** id of target element if you are applying theme only to specific container. Should be same as corresponding ThemeSwitcher, etc. */ targetId?: string; /** Diameter of the color switch */ size?: number; /** Skip system colorScheme while toggling */ skipSystem?: boolean; } /** * Color switch button to quickly set user preference. * Use same targetId for corresponding components and hooks if you are using themes for specific container only. * * @example * ```tsx * <ColorSwitch /> * ``` * * Custom size & skipSystem * * ```ts * <ColorSwitch size={20} skipSystem /> * ``` * * @source - Source code */ export declare const ColorSwitch: ({ targetId, skipSystem, size, ...props }: ColorSwitchProps) => import("react/jsx-runtime").JSX.Element; export {};