Browse Source

basic metrics

pull/1/head
Tim Glasgow 2 years ago
parent
commit
c578ffb9d5
  1. 25
      squarenotsquare/themes/Metrics.js

25
squarenotsquare/themes/Metrics.js

@ -0,0 +1,25 @@
import { PixelRatio, Dimensions } from "react-native";
let scalar = PixelRatio.get();
function normalize(size){
return (size * scalar);
}
let dimensions = Dimensions.get('window');
let height = dimensions.height;
let width = dimensions.width;
let screenWidth = width;
let screenHeight = height;
if (width > height) {
screenHeight = width;
screenWidth = height;
}
export const screenSections = {
headerHeight: normalize(20),
sectionWidth: screenWidth
}
Loading…
Cancel
Save