24 lines
478 B
TypeScript
24 lines
478 B
TypeScript
import { Dimensions, StyleSheet } from 'react-native';
|
|
|
|
const width = Dimensions.get('window').width;
|
|
const height = Dimensions.get('window').height;
|
|
|
|
export const layout = {
|
|
window: {
|
|
width,
|
|
height,
|
|
},
|
|
isSmallDevice: width < 375, // 375 but with added 5 px
|
|
isRegularDevice: width >= 375 && width <= 420,
|
|
isLargeDevice: width > 420,
|
|
gridUnit: 4,
|
|
iconSize: {
|
|
xxl: 80,
|
|
larger: 40,
|
|
large: 32,
|
|
medium: 24,
|
|
small: 16,
|
|
xsmall: 10
|
|
},
|
|
};
|