/** * @author linhd * @date 2021/8/4 14:18 * @description 单选框组 */ import React, { FunctionComponent, ReactNode } from 'react'; import { RadioProps } from '../Radio'; import { LabelTooltipProps } from '../Label'; import { HelperTextDetailProps } from '../HelperText'; import './index.scss'; export interface RadioListProps extends RadioProps { [name: string]: any; } export interface RadioGroupProps extends HelperTextDetailProps { /** 样式class */ className?: string; /** style */ style?: React.CSSProperties; /** 每一项的宽度 */ itemWidth?: string; /** 间距 只有在横向布局的时候生效 */ spacing?: string; /** 标题 */ label?: ReactNode; /** 帮组提示信息 */ labelTooltip?: LabelTooltipProps; /** 尺寸 */ size?: 'small' | 'medium' | 'large'; /** 是否必填 */ required?: boolean; /** 布局方式 横向/竖向 */ row?: boolean; /** 是否禁用 */ disabled?: boolean; /** 默认值 不受控 */ defaultValue?: any; /** 默认值 */ value?: any; /** 选中选值 */ id?: string; /** 选项数据 */ list: RadioListProps[] | RadioListProps[][]; /** 改变值 */ onChange?: (val: any, item?: RadioListProps) => void; [name: string]: any; } export declare const RadioGroup: FunctionComponent; export default RadioGroup;