ant-design/components/radio/demo/radiogroup-block.tsx

25 lines
583 B
TypeScript
Raw Normal View History

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;