import { useState } from 'react' import { RadioGroup, Text } from '../../src' import { Demo } from '../components/Demo' import { PropsTable } from '../components/PropsTable' import { Section } from '../components/Section' const OPTIONS = [ { value: 'grid', label: '网格视图' }, { value: 'list', label: '列表视图' }, { value: 'compact', label: '紧凑视图(暂不可用)', disabled: true }, ] export function RadioGroups() { const [view, setView] = useState('grid') return (
`} > {}} options={OPTIONS} disabled />`} > undefined} options={OPTIONS} disabled /> 整组禁用后仍能读出当前选中项 void', required: true, desc: '选择回调' }, { name: 'direction', type: "'row' | 'column'", defaultValue: "'column'", desc: '排列方向' }, { name: 'disabled', type: 'boolean', defaultValue: 'false', desc: '禁用整组' }, ]} />
) }