import { FieldValues, useController, UseControllerProps } from 'react-hook-form' import { Checkbox, CheckboxProps } from '@/components' type Props = UseControllerProps & Omit export const ControlledCheckbox = ({ name, rules, shouldUnregister, control, defaultValue, ...checkboxProps }: Props) => { const { field: { onChange, value }, } = useController({ name, rules, shouldUnregister, control, defaultValue, }) return ( ) }