Browse Source

square not square header

pull/8/head
Tim Glasgow 2 years ago
parent
commit
6fa6a06003
  1. 22
      squarenotsquare/src/screens/Home.js
  2. 9
      squarenotsquare/src/screens/styles/AppStyles.js
  3. 4
      squarenotsquare/src/themes/Metrics.js

22
squarenotsquare/src/screens/Home.js

@ -1,14 +1,30 @@
import React from "react"; import React from "react";
import { Text, View } from "react-native"; import { Text, View } from "react-native";
import { useState } from "react"; import { useState } from "react";
import { styles } from './styles/AppStyles';
function Home(props){ function Home(props){
return ( return (
<View> <View style={[styles.flex]}>
<Text style={{color: 'black'}}>test</Text> <View style={[styles.flexHalf, styles.spaceAround]}>
<Text style={[styles.headerTitleFont, styles.centeredText, styles.darkText]}>
Square
<Text style={[styles.green, styles.headerTitleFont, styles.centeredText, styles.lightText]}>
{' not '}
</Text>
<Text style={[styles.headerTitleFont, styles.centeredText, styles.darkText]}>
Square
</Text>
</Text>
</View>
<View style={styles.flex}>
<Text style={[styles.largeFont, styles.centeredText, styles.darkText]}>
Loading...
</Text>
</View>
</View> </View>
); )
} }
export default Home; export default Home;

9
squarenotsquare/src/screens/styles/AppStyles.js

@ -62,6 +62,7 @@ export const styles = StyleSheet.create({
italic: {fontStyle: 'italic'}, italic: {fontStyle: 'italic'},
darkText: {color: Colors.fonts.dark}, darkText: {color: Colors.fonts.dark},
lightText: {color: Colors.fonts.light},
greyText: {color: Colors.material.grey600}, greyText: {color: Colors.material.grey600},
redText: {color: Colors.material.red800}, redText: {color: Colors.material.red800},
blueText: {color: Colors.material.blue400}, blueText: {color: Colors.material.blue400},
@ -71,8 +72,16 @@ export const styles = StyleSheet.create({
backgroundColor: Colors.material.light, backgroundColor: Colors.material.light,
}, },
green: {
backgroundColor: Colors.material.green400
},
splashLogo: { splashLogo: {
width: Metrics.images.splashLogo.width, width: Metrics.images.splashLogo.width,
height: Metrics.images.splashLogo.height height: Metrics.images.splashLogo.height
},
smallMargin: {
margin: Metrics.margins.default
} }
}) })

4
squarenotsquare/src/themes/Metrics.js

@ -38,6 +38,10 @@ class AppMetrics {
height: this.screenWidth * 0.33 height: this.screenWidth * 0.33
} }
} }
this.margins = {
default: this.normalize(5)
}
} }
normalize(size){ normalize(size){

Loading…
Cancel
Save