Merge branch 'fix-fertility-icon-space' into 'master'
Fix fertility icon space Closes #237 See merge request bloodyhealth/drip!121
This commit is contained in:
+28
-22
@@ -14,6 +14,19 @@ import styles from '../styles'
|
|||||||
import AppText, { AppTextLight } from './app-text'
|
import AppText, { AppTextLight } from './app-text'
|
||||||
import nothingChanged from '../db/db-unchanged'
|
import nothingChanged from '../db/db-unchanged'
|
||||||
|
|
||||||
|
const HomeButton = ({ backgroundColor, children }) => {
|
||||||
|
return (
|
||||||
|
<View style={[
|
||||||
|
styles.homeButton,
|
||||||
|
{backgroundColor}
|
||||||
|
]}>
|
||||||
|
<AppText style={styles.homeButtonText}>
|
||||||
|
{children}
|
||||||
|
</AppText>
|
||||||
|
</View>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
export default class Home extends Component {
|
export default class Home extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
@@ -92,14 +105,11 @@ export default class Home extends Component {
|
|||||||
{ this.state.showMore &&
|
{ this.state.showMore &&
|
||||||
<AppText style={styles.paragraph}>{cycleDayMoreText}</AppText>
|
<AppText style={styles.paragraph}>{cycleDayMoreText}</AppText>
|
||||||
}
|
}
|
||||||
<View style={[
|
|
||||||
styles.homeButton,
|
<HomeButton backgroundColor={cycleDayColor}>
|
||||||
{ backgroundColor: cycleDayColor }
|
|
||||||
]}>
|
|
||||||
<AppText style={styles.homeButtonText}>
|
|
||||||
{labels.editToday}
|
{labels.editToday}
|
||||||
</AppText>
|
</HomeButton>
|
||||||
</View>
|
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
@@ -120,21 +130,21 @@ export default class Home extends Component {
|
|||||||
{this.state.predictionText}
|
{this.state.predictionText}
|
||||||
</AppText>
|
</AppText>
|
||||||
}
|
}
|
||||||
<View style={[
|
|
||||||
styles.homeButton,
|
<HomeButton backgroundColor={periodColor}>
|
||||||
{ backgroundColor: periodColor }
|
|
||||||
]}>
|
|
||||||
<AppText style={styles.homeButtonText}>
|
|
||||||
{labels.trackPeriod}
|
{labels.trackPeriod}
|
||||||
</AppText>
|
</HomeButton>
|
||||||
</View>
|
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
onPress={() => this.props.navigate('Chart')}
|
onPress={() => this.props.navigate('Chart')}
|
||||||
style={styles.homeIconElement}
|
style={styles.homeIconElement}
|
||||||
>
|
>
|
||||||
<View style={styles.homeCircle}>
|
|
||||||
|
<View style={styles.homeCircle} position='absolute' />
|
||||||
|
|
||||||
|
<View style={[styles.homeIconTextWrapper, styles.wrapperCircle]}>
|
||||||
<AppTextLight style={styles.iconText}>
|
<AppTextLight style={styles.iconText}>
|
||||||
{this.state.phase ?
|
{this.state.phase ?
|
||||||
this.state.phase.toString()
|
this.state.phase.toString()
|
||||||
@@ -153,14 +163,10 @@ export default class Home extends Component {
|
|||||||
{this.state.statusText}
|
{this.state.statusText}
|
||||||
</AppText>
|
</AppText>
|
||||||
}
|
}
|
||||||
<View style={[
|
|
||||||
styles.homeButton,
|
<HomeButton backgroundColor={secondaryColor}>
|
||||||
{ backgroundColor: secondaryColor }
|
|
||||||
]}>
|
|
||||||
<AppText style={styles.homeButtonText}>
|
|
||||||
{labels.checkFertility}
|
{labels.checkFertility}
|
||||||
</AppText>
|
</HomeButton>
|
||||||
</View>
|
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
|||||||
+7
-3
@@ -100,13 +100,17 @@ export default StyleSheet.create({
|
|||||||
marginBottom: 10,
|
marginBottom: 10,
|
||||||
},
|
},
|
||||||
wrapperCycle: {
|
wrapperCycle: {
|
||||||
width: 70,
|
width: 80,
|
||||||
height: 75
|
height: 77
|
||||||
},
|
},
|
||||||
wrapperDrop: {
|
wrapperDrop: {
|
||||||
|
width: 81,
|
||||||
|
height: 85,
|
||||||
|
marginTop: 20
|
||||||
|
},
|
||||||
|
wrapperCircle: {
|
||||||
width: 80,
|
width: 80,
|
||||||
height: 80,
|
height: 80,
|
||||||
marginTop: 20
|
|
||||||
},
|
},
|
||||||
homeCircle: {
|
homeCircle: {
|
||||||
borderRadius: 100,
|
borderRadius: 100,
|
||||||
|
|||||||
Reference in New Issue
Block a user