UNPKG

1.29 kBJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.APPROX_STATUSBAR_HEIGHT = void 0;
7
8var _reactNative = require("react-native");
9
10var _NativeModules$Native, _NativeModules$Native2, _NativeModules$Native3, _NativeModules$Native4;
11
12// Use the existence of expo-constants as a heuristic for determining if the
13// status bar is translucent on Android. This should be replaced in the future
14// with react-native-safe-area-context.
15const estimatedStatusBarHeight = (_NativeModules$Native = (_NativeModules$Native2 = _reactNative.NativeModules.NativeUnimoduleProxy) === null || _NativeModules$Native2 === void 0 ? void 0 : (_NativeModules$Native3 = _NativeModules$Native2.modulesConstants) === null || _NativeModules$Native3 === void 0 ? void 0 : (_NativeModules$Native4 = _NativeModules$Native3.ExponentConstants) === null || _NativeModules$Native4 === void 0 ? void 0 : _NativeModules$Native4.statusBarHeight) !== null && _NativeModules$Native !== void 0 ? _NativeModules$Native : 0;
16
17const APPROX_STATUSBAR_HEIGHT = _reactNative.Platform.select({
18 android: estimatedStatusBarHeight,
19 ios: _reactNative.Platform.Version < 11 ? estimatedStatusBarHeight : 0
20});
21
22exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
23//# sourceMappingURL=constants.js.map
\No newline at end of file