UNPKG

@spicy-ui/core

Version:

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

19 lines (18 loc) 853 B
import * as React from 'react'; import { ColorScales } from '../../theme'; import { LiteralUnion } from '../../types'; export declare type CheckboxColors = ColorScales; export declare type CheckboxSizes = 'xs' | 'sm' | 'md' | 'lg'; export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'width' | 'height' | 'size'> { /** Checkbox label. */ label?: string; /** If `true`, the checkbox will be disabled. */ isDisabled?: boolean; /** If `true`, the checkbox will be marked as invalid. */ isInvalid?: boolean; /** Color of the checkbox. */ color?: LiteralUnion<CheckboxColors>; /** Size of the checkbox. */ size?: LiteralUnion<CheckboxSizes>; } export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;