UNPKG

@spicy-ui/core

Version:

A themable and extensible React UI library, ready to use out of the box

14 lines (13 loc) 625 B
import * as React from 'react'; import { ColorScales } from '../../theme'; import { LiteralUnion } from '../../types'; export declare type SwitchColors = ColorScales; export declare type SwitchSizes = 'xs' | 'sm' | 'md' | 'lg'; export interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'width' | 'height' | 'size'> { label?: string; isDisabled?: boolean; isInvalid?: boolean; color?: LiteralUnion<SwitchColors>; size?: LiteralUnion<SwitchSizes>; } export declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLInputElement>>;