import { forwardRef } from 'react'; import { StyledSwitch, StyledSwitchContainer, StyledSwitchContent, StyledSwitchLabel, StyledSwitchOuterContainer, } from './Switch.style'; import { Error } from '../..'; export type SwitchProps = Omit, 'size'> & { label?: React.ReactNode; error?: React.ReactNode; disabled?: boolean; width?: string; size?: 'small' | 'regular' | 'medium'; }; export const Switch = forwardRef((props, ref) => { const { children, label, error, size = 'regular', disabled = false, width = 'fit-content', ...rest } = props; return ( {label && {label}} {children} {error && {error}} ); });