import type { RadioChangeEvent, RadioGroupProps, SpaceProps } from 'antd'; import { Radio as AntRadio, Space } from 'antd'; import type { CheckboxOptionType } from 'antd/lib/checkbox'; import type { Key } from 'react'; type RadioProps = Omit & { onChange?: (value: unknown) => void; options?: CheckboxOptionType[]; spaceProps?: SpaceProps; }; export default function Radio({ value = null, options, spaceProps, onChange, ...props }: RadioProps) { function handleChange(event: RadioChangeEvent) { if (onChange) onChange(event.target.value); } return ( {options?.map((option) => ( {option.label} ))} ); }