cjd-parkball
Version:
> 中后台业务组件库,中后台就像公园,进入需要买门票(登录),所以以 Parkball(公园球) 命名,公园内必定捕获!作为一个组件库,提供使用方法文档,方便开发者的调用
37 lines (29 loc) • 760 B
Markdown
---
category: 2
title: 箭头指向
title_en: Arrow pointing
---
zh-CN
设置了 `arrowPointAtCenter` 后,箭头将指向目标元素的中心。
en-US
The arrow points to the center of the target element, which set `arrowPointAtCenter`.
````jsx
import { Popover, Button } from 'parkball';
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);
````