@nguyentc21/react-native-tooltip
Version:
Simple tooltip for React native app
22 lines (19 loc) • 451 B
text/typescript
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 };