import { Controller, useFormContext } from "react-hook-form"; export function BooleanInput({ name, label = "Label", required, }: { name: string; label?: string | undefined; required: boolean; }) { const { control, formState: { errors }, } = useFormContext(); // retrieve all hook methods return ( ); }