mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-15 09:21:22 +08:00
6776bb8916
* docs: update demo * chore: add script * test: fix demo test * docs: convert demos * chore: move script * test: remove react-dom import * chore: update deps * docs: update riddle js * test: fix image test * docs: fix riddle demo
65 lines
1.1 KiB
Markdown
65 lines
1.1 KiB
Markdown
---
|
|
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,
|
|
};
|
|
|
|
export default () => (
|
|
<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>
|
|
);
|
|
```
|