import { Space } from 'antd'; import classNames from 'classnames'; import React from 'react'; import './index.less'; interface RadioButtonsProps { options: { value: any; label: React.ReactNode }[]; value: string; gap?: number; onChange: (value: string) => void; } const RadioButtons: React.FC = (props) => { const { options, value, onChange, gap = 12 } = props; return ( {options.map((option) => ( onChange(option.value)} className={classNames('item', { active: value === option.value })} > {option.label} ))} ); }; export default RadioButtons;