react-native-ui-lib
Version:
UI Components Library for React Native ###### Lateset version support RN44
12 lines (9 loc) • 479 B
JavaScript
import {Platform, Dimensions, NativeModules} from 'react-native';
const { StatusBarManager } = NativeModules;
const {height, width} = Dimensions.get('window');
export const isAndroid = Platform.OS === 'android';
export const isIOS = Platform.OS === 'ios';
export const screenWidth = width;
export const screenHeight = height;
export const isSmallScreen = isIOS ? (screenWidth <= 320) : (screenWidth <= 360);
export const statusBarHeight = isIOS ? 20 : StatusBarManager.HEIGHT;