simple way to rearrange home screen

This commit is contained in:
Julia Friesel
2019-05-22 16:26:39 +02:00
committed by emelko
parent ac0690ec9f
commit 668acb4afe
2 changed files with 14 additions and 9 deletions
+6 -2
View File
@@ -12,7 +12,6 @@ import links from '../i18n/en/links'
import cycleModule from '../lib/cycle' import cycleModule from '../lib/cycle'
import { getFertilityStatusForDay } from '../lib/sympto-adapter' import { getFertilityStatusForDay } from '../lib/sympto-adapter'
import styles, { cycleDayColor, periodColor, secondaryColor } from '../styles' import styles, { cycleDayColor, periodColor, secondaryColor } from '../styles'
import AppText from './app-text' import AppText from './app-text'
import Button from './button' import Button from './button'
import { formatDateForShortText } from './helpers/format-date' import { formatDateForShortText } from './helpers/format-date'
@@ -33,7 +32,11 @@ const HomeElement = ({ children, onPress, buttonColor, buttonLabel }) => {
onPress={ onPress } onPress={ onPress }
style={ styles.homeIconElement } style={ styles.homeIconElement }
> >
{ children } {children[0]}
{children[1]}
<View>
{children[2]}
<Button <Button
style={styles.homeButton} style={styles.homeButton}
onPress={ onPress } onPress={ onPress }
@@ -41,6 +44,7 @@ const HomeElement = ({ children, onPress, buttonColor, buttonLabel }) => {
{ buttonLabel } { buttonLabel }
</Button> </Button>
</View> </View>
</View>
) )
} }
+2 -1
View File
@@ -122,7 +122,8 @@ export default StyleSheet.create({
}, },
homeIconElement: { homeIconElement: {
alignItems: 'center', alignItems: 'center',
marginTop: 15 marginTop: 15,
flexDirection: 'row'
}, },
homeIconTextWrapper: { homeIconTextWrapper: {
alignItems: 'center', alignItems: 'center',