react-native-ui-lib
Version:
UI Toolset & Components Library for React Native
13 lines (10 loc) • 529 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 isShortScreen = screenHeight <= 600;
export const statusBarHeight = isIOS ? 20 : StatusBarManager.HEIGHT;