@kietpt2003/react-native-core-ui
Version:
React Native Core UI components by KietPT
68 lines (66 loc) • 2.85 kB
JavaScript
;
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/utils/resolutions.ts
var resolutions_exports = {};
__export(resolutions_exports, {
StylePlatform: () => StylePlatform,
getPaddingBottom: () => getPaddingBottom,
getPaddingTop: () => getPaddingTop,
isTablet: () => isTablet,
statusBarHeight: () => statusBarHeight
});
module.exports = __toCommonJS(resolutions_exports);
var import_react_native = require("react-native");
var import_react_native_iphone_x_helper = require("react-native-iphone-x-helper");
var import_react_native_device_info = __toESM(require("react-native-device-info"));
var getPaddingTop = () => {
let sbHeight = (0, import_react_native_iphone_x_helper.getStatusBarHeight)();
return sbHeight >= 26 && sbHeight < 28 || sbHeight === 30 ? sbHeight : 0;
};
var getPaddingBottom = () => {
let paddingBottom = (0, import_react_native_iphone_x_helper.getBottomSpace)() / 2;
return paddingBottom;
};
var isTablet = import_react_native_device_info.default.isTablet();
var StylePlatform = (styles) => {
if (isTablet) {
return styles.tablet || {};
}
return styles.phone || {};
};
var statusBarHeight = import_react_native.Platform.OS == "android" && import_react_native.StatusBar.currentHeight ? import_react_native.StatusBar.currentHeight : 0;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
StylePlatform,
getPaddingBottom,
getPaddingTop,
isTablet,
statusBarHeight
});
//# sourceMappingURL=resolutions.js.map