simple way to rearrange home screen
This commit is contained in:
+12
-8
@@ -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,13 +32,18 @@ const HomeElement = ({ children, onPress, buttonColor, buttonLabel }) => {
|
|||||||
onPress={ onPress }
|
onPress={ onPress }
|
||||||
style={ styles.homeIconElement }
|
style={ styles.homeIconElement }
|
||||||
>
|
>
|
||||||
{ children }
|
{children[0]}
|
||||||
<Button
|
{children[1]}
|
||||||
style={styles.homeButton}
|
|
||||||
onPress={ onPress }
|
<View>
|
||||||
backgroundColor={ buttonColor }>
|
{children[2]}
|
||||||
{ buttonLabel }
|
<Button
|
||||||
</Button>
|
style={styles.homeButton}
|
||||||
|
onPress={ onPress }
|
||||||
|
backgroundColor={ buttonColor }>
|
||||||
|
{ buttonLabel }
|
||||||
|
</Button>
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -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',
|
||||||
|
|||||||
Reference in New Issue
Block a user