import { FormToggle } from '@wordpress/components'; import { cn } from '@/lib/utils'; interface SwitchProps { id: string; checked: boolean; onCheckedChange: ( checked: boolean ) => void; disabled?: boolean; className?: string; } /** WordPress's FormToggle (components.css draws it as the app's switch). */ function Switch( { id, checked, onCheckedChange, disabled, className }: SwitchProps ) { return onCheckedChange( event.target.checked ) } />; } export { Switch };