Add remaining menu items and icons
This commit is contained in:
+20
-19
@@ -13,27 +13,28 @@ export default class Menu extends Component {
|
|||||||
placeActionButtons()
|
placeActionButtons()
|
||||||
:
|
:
|
||||||
<View style={styles.menu}>
|
<View style={styles.menu}>
|
||||||
<Text
|
{[
|
||||||
style={styles.dateHeader}
|
{title: 'Home', icon: 'home', componentName: 'Home'},
|
||||||
onPress={() => this.props.navigate('Home')}
|
{title: 'Calendar', icon: 'calendar-range', componentName: 'Calendar'},
|
||||||
>
|
{title: 'Chart', icon: 'chart-line', componentName: 'Chart'},
|
||||||
{'Home'}
|
{title: 'Stats', icon: 'chart-pie', componentName: 'Stats'},
|
||||||
</Text>
|
{title: 'Settings', icon: 'settings', componentName: 'Settings'},
|
||||||
<Text
|
].map(makeMenuItem)}
|
||||||
style={styles.dateHeader}
|
|
||||||
onPress={() => this.props.navigate('Calendar')}
|
|
||||||
>
|
|
||||||
{'Calendar'}
|
|
||||||
</Text>
|
|
||||||
<Text
|
|
||||||
style={styles.dateHeader}
|
|
||||||
onPress={() => this.props.navigate('Settings')}
|
|
||||||
>
|
|
||||||
{'Settings'}
|
|
||||||
</Text>
|
|
||||||
</View >
|
</View >
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function placeActionButtons() {}
|
function makeMenuItem({title, icon, componentName}) {
|
||||||
|
return (
|
||||||
|
<View style={{alignItems: 'center'}}>
|
||||||
|
<Icon name={icon} {...iconStyles.menuIcon}/>
|
||||||
|
<Text
|
||||||
|
style={styles.menuText}
|
||||||
|
onPress={() => this.props.navigate(componentName)}
|
||||||
|
>
|
||||||
|
{title}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
)
|
||||||
|
}
|
||||||
+9
-2
@@ -104,11 +104,14 @@ export default StyleSheet.create({
|
|||||||
menu: {
|
menu: {
|
||||||
backgroundColor: primaryColor,
|
backgroundColor: primaryColor,
|
||||||
paddingVertical: 18,
|
paddingVertical: 18,
|
||||||
paddingHorizontal: 15,
|
paddingHorizontal: 10,
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'space-evenly',
|
justifyContent: 'space-between',
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
},
|
},
|
||||||
|
menuText: {
|
||||||
|
color: fontOnPrimaryColor
|
||||||
|
},
|
||||||
headerCycleDay: {
|
headerCycleDay: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
justifyContent: 'space-between'
|
justifyContent: 'space-between'
|
||||||
@@ -163,5 +166,9 @@ export const iconStyles = {
|
|||||||
},
|
},
|
||||||
symptomBoxActive: {
|
symptomBoxActive: {
|
||||||
color: fontOnPrimaryColor
|
color: fontOnPrimaryColor
|
||||||
|
},
|
||||||
|
menuIcon: {
|
||||||
|
size: 20,
|
||||||
|
color: fontOnPrimaryColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user