mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-14 08:09:13 +08:00
25 lines
583 B
TypeScript
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;
|