import { default as React } from 'react'; import { IconType } from '../icon'; import { ToggleSize, ToggleVariant } from './types'; import { FormError } from '../../types'; import * as TogglePrimitive from '@radix-ui/react-toggle'; type OmitProp = 'pressed' | 'disabled' | 'onToggle' | 'asChild' | 'isActive' | 'onToggle' | 'value' | 'onChange'; type RadixToggleProp = React.ComponentPropsWithRef; /** * Interface for Toggle component props */ export default interface IToggleProps extends Omit, FormError { /** * Optional icon name to display in the toggle */ icon?: IconType; /** * Optional label text to display in the toggle */ label?: string; /** * Optional variant of the toggle */ variant?: ToggleVariant; /** * Optional size of the toggle */ size?: ToggleSize; /** * Whether the toggle is currently active */ value?: boolean; /** * Whether the toggle is disabled */ isDisabled?: boolean; /** * Callback function when toggle state changes * @param pressed */ onChange?(pressed: boolean): void; } export {};