zent
Version:
一套前端设计语言和基于React的实现
27 lines (23 loc) • 518 B
text/typescript
import { IPositionFunction } from '../position-function';
import { prefix } from './prefix';
/**
* ---------------
* | anchor |
* | |
* ---------------
* |popover|
* ---------
*/
export const BottomLeft: IPositionFunction = ({ relativeRect, cushion }) => {
const { left, bottom } = relativeRect;
const x = left;
const y = bottom + cushion;
return {
style: {
position: 'absolute',
left: x,
top: y,
},
className: prefix('position-bottom-left'),
};
};