UNPKG

@coconut-software/ui

Version:

React components for faster and easier web development.

17 lines (16 loc) 667 B
import type { ChangeEventHandler, PropsWithChildren, Ref } from 'react'; interface SwitchProps { 'aria-label'?: string; color?: SwitchColor; defaultChecked?: boolean; disabled?: boolean; helperText?: string; inputRef?: Ref<HTMLInputElement>; name?: string; onChange?: ChangeEventHandler<HTMLInputElement>; size?: SwitchSize; } type SwitchColor = 'primary' | 'secondary'; type SwitchSize = 'medium' | 'small'; declare function Switch({ 'aria-label': label, children, color, defaultChecked, disabled, helperText, inputRef, name, onChange, size, }: PropsWithChildren<SwitchProps>): JSX.Element; export default Switch;