import type { RadioChangeEvent, RadioGroupProps, SpaceProps } from 'antd'; import { Form, Radio as AntRadio, Space } from 'antd'; import type { BaseElementProps, BaseOption } from './types'; const { Item: FormItem } = Form; type ElementProps = BaseElementProps & { options: BaseOption[]; 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} ))} ); } type RadioProps = RadioGroupProps & { spaceProps?: SpaceProps; }; export type { RadioProps };