mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-16 09:39:10 +08:00
50 lines
1.0 KiB
TypeScript
50 lines
1.0 KiB
TypeScript
|
import React from 'react';
|
||
|
import { Checkbox, Radio, Space } from 'antd';
|
||
|
|
||
|
const sharedStyle: React.CSSProperties = {
|
||
|
border: '1px solid red',
|
||
|
marginBottom: 16,
|
||
|
};
|
||
|
|
||
|
const App: React.FC = () => (
|
||
|
<div>
|
||
|
<Space style={sharedStyle} align="center">
|
||
|
<Checkbox value="light" />
|
||
|
<div>Bamboo</div>
|
||
|
<Checkbox value="little">Little</Checkbox>
|
||
|
</Space>
|
||
|
|
||
|
<Space style={sharedStyle} align="center">
|
||
|
<Radio value="light" />
|
||
|
<div>Bamboo</div>
|
||
|
<Radio value="little">Little</Radio>
|
||
|
</Space>
|
||
|
|
||
|
<div
|
||
|
style={{
|
||
|
...sharedStyle,
|
||
|
display: 'flex',
|
||
|
alignItems: 'center',
|
||
|
}}
|
||
|
>
|
||
|
<Checkbox value="light" />
|
||
|
<div>Bamboo</div>
|
||
|
<Checkbox value="little">Little</Checkbox>
|
||
|
</div>
|
||
|
|
||
|
<div
|
||
|
style={{
|
||
|
...sharedStyle,
|
||
|
display: 'flex',
|
||
|
alignItems: 'center',
|
||
|
}}
|
||
|
>
|
||
|
<Radio value="light" />
|
||
|
<div>Bamboo</div>
|
||
|
<Radio value="little">Little</Radio>
|
||
|
</div>
|
||
|
</div>
|
||
|
);
|
||
|
|
||
|
export default App;
|