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