2021-04-22 20:15:23 +08:00
|
|
|
---
|
|
|
|
order: 99
|
|
|
|
title:
|
|
|
|
zh-CN: 同行布局
|
|
|
|
en-US: Same line
|
|
|
|
debug: true
|
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
|
|
|
同行布局
|
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
|
|
|
Same line
|
|
|
|
|
|
|
|
```tsx
|
|
|
|
import { Checkbox, Radio, Space } from 'antd';
|
|
|
|
|
|
|
|
const sharedStyle: React.CSSProperties = {
|
|
|
|
border: '1px solid red',
|
|
|
|
marginBottom: 16,
|
|
|
|
};
|
|
|
|
|
2022-04-03 23:27:45 +08:00
|
|
|
export default () => (
|
2021-04-22 20:15:23 +08:00
|
|
|
<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>
|
2022-04-03 23:27:45 +08:00
|
|
|
</div>
|
2021-04-22 20:15:23 +08:00
|
|
|
);
|
|
|
|
```
|