Some helpers for StatusBar
.
import React from 'react';
import { View } from 'react-native';
import {
Text,
isIPhoneX,
isIPhoneXMax,
isIPhone12,
isIPhone12Max,
isIPhoneWithMonobrow,
getStatusBarHeight,
} from '@eslam-elmeniawy/react-native-common-components';
const MyComponent = () => {
return (
<View>
<Text>{`isIPhoneX: ${isIPhoneX()}`}</Text>
<Text>{`isIPhoneXMax: ${isIPhoneXMax()}`}</Text>
<Text>{`isIPhone12: ${isIPhone12()}`}</Text>
<Text>{`isIPhone12Max: ${isIPhone12Max()}`}</Text>
<Text>{`isIPhoneWithMonobrow: ${isIPhoneWithMonobrow()}`}</Text>
<Text>{`StatusBarHeight: ${getStatusBarHeight()}`}</Text>
</View>
);
};
Type: () => boolean
Type: () => boolean
Type: () => boolean
Type: () => boolean
Type: () => boolean
Type: () => boolean
Type: () => boolean
Type: (skipAndroid?: boolean) => number