ant-design/components/radio/demo/radiogroup-block.tsx
yuanliu 5a2818600c
feat(radio): add 'block' argument for Radio.Group (#50828)
Co-authored-by: afc163 <afc163@gmail.com>
Co-authored-by: liuyuan <yuanliu147@qq.com>
2024-09-16 17:21:55 +08:00

25 lines
583 B
TypeScript

import React from 'react';
import { Flex, Radio } from 'antd';
const options = [
{ label: 'Apple', value: 'Apple' },
{ label: 'Pear', value: 'Pear' },
{ label: 'Orange', value: 'Orange' },
];
const App: React.FC = () => (
<Flex vertical gap="middle">
<Radio.Group block options={options} defaultValue="Apple" />
<Radio.Group
block
options={options}
defaultValue="Apple"
optionType="button"
buttonStyle="solid"
/>
<Radio.Group block options={options} defaultValue="Pear" optionType="button" />
</Flex>
);
export default App;