/** * Adapted from * https://github.com/chakra-ui/chakra-ui/blob/main/packages/switch/src/switch.tsx * so as to support inserting icons in the switch thumb (the circular part). */ import { ComponentWithAs as _, HTMLChakraProps, SystemProps, ThemingProps, UseCheckboxProps } from '@chakra-ui/react'; export interface SwitchProps extends Omit, Omit, keyof UseCheckboxProps>, ThemingProps<'Switch'> { /** * The spacing between the switch and its label text * @default 0.5rem * @type SystemProps["marginLeft"] */ spacing?: SystemProps['marginLeft']; /** * Icon for disabled switch; defaults to lock-alt. */ disabledIcon?: (props: React.SVGProps) => JSX.Element; /** * Icon for checked switch; defaults to BxCheck. */ checkedIcon?: (props: React.SVGProps) => JSX.Element; /** * Icon for unchecked switch; defaults to BxLockAlt. */ uncheckedIcon?: (props: React.SVGProps) => JSX.Element; /** * Icon for loading switch; defaults to BxLoader. */ loadingIcon?: (props: React.SVGProps) => JSX.Element; /** * Whether the switch is in an indeterminate loading state. */ isLoading?: boolean; } export declare const Switch: _<"input", SwitchProps>;