UNPKG

1.09 kBJavaScriptView Raw
1var _NativeModules$Native, _NativeModules$Native2, _NativeModules$Native3, _NativeModules$Native4;
2
3import { NativeModules, Platform } from 'react-native'; // Use the existence of expo-constants as a heuristic for determining if the
4// status bar is translucent on Android. This should be replaced in the future
5// with react-native-safe-area-context.
6
7const estimatedStatusBarHeight = (_NativeModules$Native = (_NativeModules$Native2 = 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;
8export const APPROX_STATUSBAR_HEIGHT = Platform.select({
9 android: estimatedStatusBarHeight,
10 ios: Platform.Version < 11 ? estimatedStatusBarHeight : 0
11});
12//# sourceMappingURL=constants.js.map
\No newline at end of file