INNER CODE UNIT · JavaScript

isOrientationLandscape

lucasferreira/react-native-flash-message · src/FlashMessageWrapper.js:38

const isOrientationLandscape = ({ width, height }) => width > height;

/**
 * Helper function to get the current status bar height to plus in paddingTop message
 */
export function getFlashMessageStatusBarHeight(isLandscape = false, _customStatusBarHeight = null) {
  if (_customStatusBarHeight !== null && _customStatusBarHeight !== false) {
    return typeof _customStatusBarHeight === "function" ? _customStatusBarHeight(isLandscape) : +_customStatusBarHeight;
  }

  /**
   * This is a temporary workaround because we don't have a way to detect
   * if the status bar is translucent or opaque. If opaque, we don't need to
   * factor in the height here; if translucent (content renders under it) then
   * we do.
   */
  if (isAndroid) {
    if (!!global && !!global.Expo) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…