UNPKG

@nguyentc21/react-native-tooltip

Version:
22 lines (19 loc) 451 B
import type { Dimension } from '../types'; import type { LimitPosition } from './types'; const getLimitScreenPosition = (args: { dimension: Dimension; }): LimitPosition => { const { dimension } = args; const { width, height } = dimension; return { minTop: 0, minBottom: 0, minLeft: 0, minRight: 0, maxTop: height, maxBottom: height, maxLeft: width, maxRight: width, }; }; export { getLimitScreenPosition };