import { HTMLAttributes, forwardRef, useEffect, useRef } from 'react'; interface Props extends HTMLAttributes { checked?: boolean; indeterminate?: boolean; } export const Checkbox = ({ indeterminate, ...rest }: Props) => { const ref = useRef(null); useEffect(() => { if (ref.current) { ref.current.indeterminate = indeterminate ?? false; } }, [indeterminate]); return ; };