import type { RadioChangeEvent, RadioGroupProps, SpaceProps } from 'antd'; import { Form, Radio as AntRadio, Space } from 'antd'; import type { FC } from 'react'; import type { BaseElementProps, BaseOption } from './types'; const { Item: FormItem } = Form; type ElementProps = BaseElementProps & { options: BaseOption[]; spaceProps?: SpaceProps; }; type RadioProps = RadioGroupProps & { spaceProps?: SpaceProps; }; export default (function Radio({ value = null, setValue, options, status, isValid, help, spaceProps, ...props }: ElementProps) { function handleChange(e: RadioChangeEvent) { setValue(e.target.value); } return ( {options.map((option) => ( {option.label} ))} ); } as FC);