import * as React from 'react'; import * as SwitchPrimitive from '@radix-ui/react-switch'; import { cn } from '@/lib/utils'; export const Switch = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( )); Switch.displayName = 'Switch'; /** Switch with a label and optional description, the whole row clickable. */ export function SwitchRow({ label, description, checked, onCheckedChange, disabled, id, }: { label: React.ReactNode; description?: React.ReactNode; checked: boolean; onCheckedChange: (v: boolean) => void; disabled?: boolean; id?: string; }) { const auto = React.useId(); const sid = id ?? auto; return (
); }