import { forwardRef, useId, type InputHTMLAttributes, type ReactNode } from 'react'; import { Check } from 'lucide-react'; import { cn } from '../utils/cn'; interface Props extends Omit, 'type' | 'size'> { label?: ReactNode; hint?: string; error?: string; } export const Checkbox = forwardRef(function Checkbox( { label, hint, error, className, id, disabled, ...rest }, ref, ) { const generatedId = useId(); const cbId = id || generatedId; return (
{hint && !error &&

{hint}

} {error &&

{error}

}
); });