import { useRef } from 'react' import { RadioCheckedIcon } from 'lib/icons/RadioChecked.js' import { RadioUncheckedIcon } from 'lib/icons/RadioUnchecked.js' import { useRadioField } from 'lib/ui/RadioField/RadioField.js' interface RadioProps { value: Value label: string } export function Radio({ value, label, }: RadioProps): JSX.Element { const { value: fieldValue, onChange, name } = useRadioField() const checked = fieldValue === value const inputRef = useRef() const checkRadio = (): void => { if (inputRef.current != null) { inputRef.current.click() } } return ( ) }