import React, { useMemo } from 'react'; import { v4 as uuidv4 } from 'uuid'; interface IRadioButton { value: string checked?: boolean name: string onChange: React.ChangeEventHandler label: React.ReactNode } /** * A group for radio input with label. */ const RadioButton: React.FC = ({ name, value, checked, onChange, label }) => { const formFieldId: string = useMemo(() => `radio-${uuidv4()}`, []); return (
); }; export default RadioButton;