diff options
author | Ivan Chen <ivan@thetaggid.com> | 2021-01-22 19:13:53 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-22 19:13:53 -0500 |
commit | 2262d4937d0248e4742f149c7aa4ec79f76c8478 (patch) | |
tree | 308517c416605f13163bf6847e5c322ee23ab2e8 /src/utils/statusBarHeight.ts | |
parent | 9921e80e60cb24d0fc7b99123a8b146c6e7d14ff (diff) | |
parent | e5915b02008dfcebe08de063f0440974c8415d4b (diff) |
Merge pull request #196 from IvanIFChen/tma552-adjust-styles-and-sizes
[TMA-552] Adjust Styles and Sizes
Diffstat (limited to 'src/utils/statusBarHeight.ts')
-rw-r--r-- | src/utils/statusBarHeight.ts | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/utils/statusBarHeight.ts b/src/utils/statusBarHeight.ts deleted file mode 100644 index b8eb7b33..00000000 --- a/src/utils/statusBarHeight.ts +++ /dev/null @@ -1,28 +0,0 @@ -import {Platform, StatusBar} from 'react-native'; -import {SCREEN_HEIGHT, SCREEN_WIDTH} from './screenDimensions'; - -const X_WIDTH = 375; -const X_HEIGHT = 812; -const XSMAX_WIDTH = 414; -const XSMAX_HEIGHT = 896; - -export const isIPhoneX = () => - Platform.OS === 'ios' && !Platform.isPad && !Platform.isTVOS - ? (SCREEN_WIDTH === X_WIDTH && SCREEN_HEIGHT === X_HEIGHT) || - (SCREEN_WIDTH === XSMAX_WIDTH && SCREEN_HEIGHT === XSMAX_HEIGHT) - : false; - -// Taken from: https://github.com/react-navigation/react-navigation/issues/283 -export const HeaderHeight = Platform.select({ - ios: 44, - android: 56, - default: 64, -}); - -export const StatusBarHeight = Platform.select({ - ios: isIPhoneX() ? 44 : 20, - android: StatusBar.currentHeight, - default: 0, -}); - -export const AvatarHeaderHeight = (HeaderHeight + StatusBarHeight) * 1.3; |