Browse Source

calculate dimensions in metrics constructor

pull/8/head
Tim Glasgow 2 years ago
parent
commit
e37eeacdec
  1. 14
      squarenotsquare/src/themes/Metrics.js

14
squarenotsquare/src/themes/Metrics.js

@ -14,16 +14,20 @@ class AppMetrics {
this.screenWidth = width; this.screenWidth = width;
this.screenHeight = height; this.screenHeight = height;
} }
this.screenSections = {
headerHeight: this.normalize(20),
sectionWidth: this.screenWidth
}
this.icons = {
splashIcon: this.normalize(100)
}
} }
normalize(size){ normalize(size){
return (size * this.scalar); return (size * this.scalar);
} }
screenSections = {
headerHeight: this.normalize(20),
sectionWidth: this.screenWidth
}
} }
const Metrics = new AppMetrics(); const Metrics = new AppMetrics();

Loading…
Cancel
Save