ant-design/components/popover/demo/arrow-point-at-center.md
2017-01-19 15:22:53 +08:00

768 B

order title
4
zh-CN en-US
箭头指向 Arrow pointing

zh-CN

设置了 arrowPointAtCenter 后,箭头将指向目标元素的中心。

en-US

The arrow points to the center of the target element, which set arrowPointAtCenter.

import { Popover, Button } from 'antd';

const text = <span>Title</span>;
const content = (
  <div>
    <p>Content</p>
    <p>Content</p>
  </div>
);

ReactDOM.render(
  <div>
    <Popover placement="topLeft" title={text} content={content}>
      <Button>Align edge / 边缘对齐</Button>
    </Popover>
    <Popover placement="topLeft" title={text} content={content} arrowPointAtCenter>
      <Button>Arrow points to center / 箭头指向中心</Button>
    </Popover>
  </div>
, mountNode);