import { ReactElement, ChangeEvent } from 'react'; import { IconName } from '../Icon'; import { CommonProps } from '../common'; export interface SwitchProps extends Omit { /** * Control whether the switch is checked */ checked?: boolean; /** * Whether the switch is disabled */ disabled?: boolean; /** * Specify the icon will be shown inside the checked switch */ icon?: IconName; /** * Id of element. */ id?: string; /** * Whether the switch is loading */ loading?: boolean; /** * Name of element, is used to refer to the form data for submission. */ name?: string; /** * Change event handler. Use `event.target.checked` to see whether the switch will be changed to checked. */ onChange?: (e: ChangeEvent) => void; /** * Size of the switch */ size?: 'small' | 'medium'; } declare const Switch: ({ size, icon, loading, disabled, checked, onChange, name, id, className, style, sx, "data-test-id": dataTestId, }: SwitchProps) => ReactElement; export default Switch;