import React, { HTMLProps, useEffect, useRef } from "react";
export const Checkbox = ({
indeterminate,
className = "",
...rest
}: { indeterminate?: boolean } & HTMLProps) => {
const ref = useRef(null!);
useEffect(() => {
if (typeof indeterminate === "boolean") {
ref.current.indeterminate = !rest.checked && indeterminate;
}
}, [ref, indeterminate]);
return ;
};