@snowball-tech/fractal
Version:
Fractal's (Snowball's design system) React component library based on RadixUI and PandaCSS
24 lines (20 loc) • 760 B
TypeScript
import * as react from 'react';
import { ReactNode } from 'react';
import { SwitchProps as SwitchProps$1 } from '@radix-ui/react-switch';
interface SwitchProps extends Omit<SwitchProps$1, 'asChild' | 'onCheckedChange' | 'onToggle'> {
checked?: boolean;
children?: ReactNode;
defaultChecked?: boolean;
disabled?: boolean;
id?: string;
label?: ReactNode;
labelElement?: keyof HTMLElementTagNameMap;
labels?: Array<ReactNode>;
name?: string;
required?: boolean;
switchPosition?: 'left' | 'right';
value?: string;
onToggle?: (newState: boolean) => void;
}
declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<HTMLButtonElement | null>>;
export { Switch, type SwitchProps };