import './index.css' import { forwardRef, memo, useCallback } from 'react' import { useClassNames } from '../../../_lib/useClassNames' type CharcoalCheckboxInputProps = { invalid?: boolean onChange?: (checked: boolean) => void rounded?: boolean } type InputProps = React.HTMLProps export type CheckboxInputProps = CharcoalCheckboxInputProps & Omit const CheckboxInput = forwardRef( function CheckboxInput( { onChange, checked, invalid, className, rounded, ...props }, ref, ) { const handleChange = useCallback( (e: React.ChangeEvent) => { const el = e.currentTarget onChange?.(el.checked) }, [onChange], ) const classNames = useClassNames('charcoal-checkbox-input', className) return ( ) }, ) export default memo(CheckboxInput)