ant-design/components/divider/demo/with-text.md
偏右 1dab17eef0
feat: 💄 Divider support plain for lighter style (#23405)
* 💄 Divider support `asHeading` for lighter style

*  fix demo snapshot

* docs: 📖 Divider asHeading documentation

* fix tsd

*  fix demo snapshot

* asHeading to plain

*  fix demo snapshot

* fix css
2020-04-21 14:16:33 +08:00

1.2 KiB

order title
1
zh-CN en-US
带文字的分割线 Divider with title

zh-CN

分割线中带有文字,可以用 orientation 指定文字位置。

en-US

Divider with inner title, set orientation="left/right" to align it.

import { Divider } from 'antd';

ReactDOM.render(
  <>
    <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>
  </>,
  mountNode,
);