mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-05 09:49:57 +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
57 lines
1.7 KiB
Markdown
57 lines
1.7 KiB
Markdown
---
|
|
order: 1
|
|
title:
|
|
zh-CN: 带文字的分割线
|
|
en-US: Divider with title
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
分割线中带有文字,可以用 `orientation` 指定文字位置。
|
|
|
|
## en-US
|
|
|
|
Divider with inner title, set `orientation="left/right"` to align it.
|
|
|
|
```jsx
|
|
import { Divider } from 'antd';
|
|
|
|
export default () => (
|
|
<>
|
|
<p>
|
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista
|
|
probare, quae sunt a te dicta? Refert tamen, quo modo.
|
|
</p>
|
|
<Divider>Text</Divider>
|
|
<p>
|
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista
|
|
probare, quae sunt a te dicta? Refert tamen, quo modo.
|
|
</p>
|
|
<Divider orientation="left">Left Text</Divider>
|
|
<p>
|
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista
|
|
probare, quae sunt a te dicta? Refert tamen, quo modo.
|
|
</p>
|
|
<Divider orientation="right">Right Text</Divider>
|
|
<p>
|
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista
|
|
probare, quae sunt a te dicta? Refert tamen, quo modo.
|
|
</p>
|
|
<Divider orientation="left" orientationMargin="0">
|
|
Left Text with 0 orientationMargin
|
|
</Divider>
|
|
<p>
|
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista
|
|
probare, quae sunt a te dicta? Refert tamen, quo modo.
|
|
</p>
|
|
<Divider orientation="right" orientationMargin={50}>
|
|
Right Text with 50px orientationMargin
|
|
</Divider>
|
|
<p>
|
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista
|
|
probare, quae sunt a te dicta? Refert tamen, quo modo.
|
|
</p>
|
|
</>
|
|
);
|
|
```
|