import clsx from 'clsx' interface SwitchProps { checked: boolean onChange: (checked: boolean) => void label?: string description?: string disabled?: boolean id?: string } export default function Switch({ checked, onChange, label, description, disabled = false, id, }: SwitchProps) { const switchId = id || `switch-${label?.replace(/\s+/g, '-').toLowerCase()}` return (
{(label || description) && (
{label && ( )} {description &&

{description}

}
)}
) }