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