Add buttons to home screen
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
import React, { Component } from 'react'
|
import React, { Component } from 'react'
|
||||||
import {
|
import {
|
||||||
View,
|
View,
|
||||||
Button
|
Button,
|
||||||
|
Text
|
||||||
} from 'react-native'
|
} from 'react-native'
|
||||||
import * as styles from './styles'
|
import styles from './styles'
|
||||||
|
|
||||||
export default class home extends Component {
|
export default class home extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
@@ -13,10 +14,21 @@ export default class home extends Component {
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
|
<Text style={styles.welcome}>Welcome! Today is day 6 of your current cycle</Text>
|
||||||
<Button
|
<Button
|
||||||
onPress={() => {}}
|
onPress={goToSymptomEdit}
|
||||||
title="Home"></Button>
|
title="Edit symptoms for today">
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
onPress={goToCalendar}
|
||||||
|
title="Go to calendar">
|
||||||
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function goToSymptomEdit () {
|
||||||
|
|
||||||
|
}
|
||||||
|
function goToCalendar () {}
|
||||||
|
|||||||
@@ -1,16 +1,13 @@
|
|||||||
import { StyleSheet } from 'react-native'
|
import { StyleSheet } from 'react-native'
|
||||||
|
|
||||||
const ourStyle = StyleSheet.create({
|
export default StyleSheet.create({
|
||||||
container: {
|
container: {
|
||||||
flex: 1,
|
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
alignItems: 'center'
|
alignItems: 'center'
|
||||||
},
|
},
|
||||||
welcome: {
|
welcome: {
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
textAlign: 'center',
|
margin: 30,
|
||||||
margin: 10,
|
textAlign: 'center'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
export { ourStyle }
|
|
||||||
|
|||||||
Reference in New Issue
Block a user