import classNames from 'classnames' import { useRef } from 'react' import { CheckboxBlankIcon } from 'lib/icons/CheckboxBlank.js' import { CheckboxFilledIcon } from 'lib/icons/CheckboxFilled.js' interface CheckboxProps { label: string checked?: boolean onChange: (checked: boolean) => void className?: string } export function Checkbox({ label, checked, onChange, className, }: CheckboxProps): JSX.Element { const inputRef = useRef(null) const toggle = (): void => { if (inputRef.current != null) { inputRef.current.click() } } return (
{checked === true ? : } { onChange(event.target.checked) }} checked={checked} /> {label}
) }