import { classNames } from '@/utils'; import React, { FC, useEffect, useRef } from 'react'; export interface SimpleCheckboxProps { checked?: boolean; indeterminate?: boolean; input: { [key: string]: any; }; label?: React.ReactNode; className?: string; disabled?: boolean; onChange?: React.ChangeEventHandler; } const SimpleCheckbox: FC = (props) => { const inputRef = useRef(null); useEffect(() => { if (props.indeterminate) { if (inputRef.current) { inputRef.current.indeterminate = true; } } else { if (inputRef.current) { inputRef.current.indeterminate = false; } } }, [props.indeterminate]); return ( <>
); }; export default SimpleCheckbox;