Make home screen spacing more consistent

This commit is contained in:
Julia Friesel
2019-02-02 21:51:00 +01:00
parent 0878654e82
commit 14b964443e
2 changed files with 11 additions and 7 deletions
+4 -3
View File
@@ -53,6 +53,7 @@ const HomeElement = ({ children, onPress, buttonColor, buttonLabel }) => {
> >
{ children } { children }
<Button <Button
style={styles.homeButton}
onPress={ onPress } onPress={ onPress }
backgroundColor={ buttonColor }> backgroundColor={ buttonColor }>
{ buttonLabel } { buttonLabel }
@@ -108,7 +109,7 @@ export default class Home extends Component {
buttonColor={ cycleDayColor } buttonColor={ cycleDayColor }
buttonLabel={ labels.editToday } buttonLabel={ labels.editToday }
> >
<View position='absolute'> <View>
<DripHomeIcon name="circle" size={80} color={cycleDayColor}/> <DripHomeIcon name="circle" size={80} color={cycleDayColor}/>
</View> </View>
<IconText wrapperStyles={styles.wrapperCycle}> <IconText wrapperStyles={styles.wrapperCycle}>
@@ -125,7 +126,7 @@ export default class Home extends Component {
buttonColor={ periodColor } buttonColor={ periodColor }
buttonLabel={ labels.trackPeriod } buttonLabel={ labels.trackPeriod }
> >
<View position='absolute'> <View>
<DripHomeIcon name="drop" size={105} color={periodColor} /> <DripHomeIcon name="drop" size={105} color={periodColor} />
</View> </View>
@@ -145,7 +146,7 @@ export default class Home extends Component {
buttonColor={ secondaryColor } buttonColor={ secondaryColor }
buttonLabel={ labels.checkFertility } buttonLabel={ labels.checkFertility }
> >
<View style={styles.homeCircle} position='absolute' /> <View style={styles.homeCircle}/>
<IconText wrapperStyles={styles.wrapperCircle}> <IconText wrapperStyles={styles.wrapperCircle}>
{ phase ? phase.toString() : labels.unknown } { phase ? phase.toString() : labels.unknown }
+7 -4
View File
@@ -95,7 +95,6 @@ export default StyleSheet.create({
}, },
homeView: { homeView: {
marginHorizontal: 50, marginHorizontal: 50,
marginTop: 20,
}, },
button: { button: {
paddingVertical: 10, paddingVertical: 10,
@@ -105,13 +104,14 @@ export default StyleSheet.create({
}, },
homeButton: { homeButton: {
width: 200, width: 200,
marginTop: 5
}, },
homeButtonText: { homeButtonText: {
color: fontOnPrimaryColor color: fontOnPrimaryColor
}, },
homeIconElement: { homeIconElement: {
alignItems: 'center', alignItems: 'center',
marginBottom: 10 marginTop: 15
}, },
homeIconTextWrapper: { homeIconTextWrapper: {
alignItems: 'center', alignItems: 'center',
@@ -120,16 +120,19 @@ export default StyleSheet.create({
}, },
wrapperCycle: { wrapperCycle: {
width: 80, width: 80,
height: 77 height: 77,
position: 'absolute'
}, },
wrapperDrop: { wrapperDrop: {
width: 81, width: 81,
height: 85, height: 85,
marginTop: 20 marginTop: 20,
position: 'absolute'
}, },
wrapperCircle: { wrapperCircle: {
width: 80, width: 80,
height: 80, height: 80,
position: 'absolute'
}, },
homeCircle: { homeCircle: {
borderRadius: 100, borderRadius: 100,