import { cn } from "@/lib/utils"; import React, { forwardRef } from "react"; import { Checkbox as BaseCheckbox } from "react-daisyui"; import FormControl from "./form-control"; import { FieldValues } from "react-hook-form"; type CheckboxProps = Omit< React.ComponentPropsWithoutRef, "form" > & { label?: string; inputClassName?: string; }; const Checkbox = forwardRef( ({ label, className, inputClassName, ...props }, ref) => { return ( ); } ); type CheckboxFieldProps = Omit< React.ComponentPropsWithoutRef>, "render" > & CheckboxProps; export const CheckboxField = ({ form, name, ...props }: CheckboxFieldProps) => { return ( ( field.onChange(e.target.checked)} /> )} /> ); }; export default Checkbox;