Skip to content
Snippets Groups Projects
Commit 16b31998 authored by Julia Friesel's avatar Julia Friesel
Browse files

Make sure drop text is always positioned correctly

parent d13a7769
No related branches found
No related tags found
No related merge requests found
...@@ -32,8 +32,10 @@ const HomeElement = ({ children, onPress, buttonColor, buttonLabel }) => { ...@@ -32,8 +32,10 @@ const HomeElement = ({ children, onPress, buttonColor, buttonLabel }) => {
onPress={ onPress } onPress={ onPress }
style={ styles.homeElement } style={ styles.homeElement }
> >
{children[0]} <View style={styles.homeIconAndText}>
{children[1]} {children[0]}
{children[1]}
</View>
<View style={{paddingLeft: 15}}> <View style={{paddingLeft: 15}}>
{children[2]} {children[2]}
...@@ -108,11 +110,9 @@ export default class Home extends Component { ...@@ -108,11 +110,9 @@ export default class Home extends Component {
buttonColor={ periodColor } buttonColor={ periodColor }
buttonLabel={ labels.trackPeriod } buttonLabel={ labels.trackPeriod }
> >
<View> <DripHomeIcon name="drop" size={100} color={periodColor} />
<DripHomeIcon name="drop" size={100} color={periodColor} />
</View>
<IconText wrapperStyles={{top: 45, ...styles.wrapperIcon}}> <IconText wrapperStyles={{top: '50%', ...styles.wrapperIcon}}>
{this.state.bleedingPredictionRange} {this.state.bleedingPredictionRange}
</IconText> </IconText>
......
...@@ -125,7 +125,6 @@ export default StyleSheet.create({ ...@@ -125,7 +125,6 @@ export default StyleSheet.create({
marginBottom: defaultBottomMargin, marginBottom: defaultBottomMargin,
}, },
homeElement: { homeElement: {
alignItems: 'center',
marginBottom: 40, marginBottom: 40,
flexDirection: 'row', flexDirection: 'row',
}, },
...@@ -133,6 +132,9 @@ export default StyleSheet.create({ ...@@ -133,6 +132,9 @@ export default StyleSheet.create({
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
}, },
homeIconAndText: {
justifyContent: 'center'
},
wrapperIcon: { wrapperIcon: {
width: 80, width: 80,
position: 'absolute' position: 'absolute'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment