UNPKG

zent

Version:

一套前端设计语言和基于React的实现

19 lines (16 loc) 395 B
import { prefix } from '../placement/prefix'; import { IPopoverPosition } from '../position-function'; export default function createArrowPosition( x: number, y: number, side: string ): IPopoverPosition { return { style: { position: 'absolute', left: `${Math.round(x)}px`, top: `${Math.round(y)}px`, }, className: prefix(`position-arrow-${side}`), }; }