UNPKG

@loke/ui

Version:
20 lines (19 loc) 1.2 kB
import { Primitive } from "@loke/ui/primitive"; import { type ComponentPropsWithoutRef } from "react"; declare const createSwitchScope: import("@loke/ui/context").CreateScope; type PrimitiveButtonProps = ComponentPropsWithoutRef<typeof Primitive.button>; interface SwitchProps extends PrimitiveButtonProps { checked?: boolean; defaultChecked?: boolean; onCheckedChange?(checked: boolean): void; required?: boolean; } declare const Switch: import("react").ForwardRefExoticComponent<SwitchProps & import("react").RefAttributes<HTMLButtonElement>>; type PrimitiveSpanProps = ComponentPropsWithoutRef<typeof Primitive.span>; interface SwitchThumbProps extends PrimitiveSpanProps { } declare const SwitchThumb: import("react").ForwardRefExoticComponent<SwitchThumbProps & import("react").RefAttributes<HTMLSpanElement>>; declare const Root: import("react").ForwardRefExoticComponent<SwitchProps & import("react").RefAttributes<HTMLButtonElement>>; declare const Thumb: import("react").ForwardRefExoticComponent<SwitchThumbProps & import("react").RefAttributes<HTMLSpanElement>>; export { createSwitchScope, Switch, SwitchThumb, Root, Thumb, }; export type { SwitchProps, SwitchThumbProps };