Replace action button footer in remaining symptom views

This commit is contained in:
Julia Friesel
2018-08-20 13:44:05 +02:00
parent d897c3b89f
commit 8629fd5369
10 changed files with 375 additions and 394 deletions
+14 -14
View File
@@ -7,6 +7,7 @@ import {
import styles from '../../../styles'
import { saveSymptom } from '../../../db'
import ActionButtonFooter from './action-button-footer'
export default class Temp extends Component {
constructor(props) {
@@ -22,7 +23,7 @@ export default class Temp extends Component {
render() {
return (
<View style={styles.symptomEditView}>
<View style={styles.menuOnBottom}>
<View style={styles.symptomViewRow}>
<Text style={styles.symptomDayView}>Note</Text>
<TextInput
@@ -34,19 +35,18 @@ export default class Temp extends Component {
value={this.state.currentValue}
/>
</View>
<View style={styles.actionButtonRow}>
{this.makeActionButtons({
symptom: 'note',
cycleDay: this.cycleDay,
saveAction: () => {
saveSymptom('note', this.cycleDay, {
value: this.state.currentValue
})
},
saveDisabled: !this.state.currentValue
})}
</View>
<ActionButtonFooter
symptom='note'
cycleDay={this.cycleDay}
saveAction={() => {
saveSymptom('note', this.cycleDay, {
value: this.state.currentValue
})
}}
saveDisabled={!this.state.currentValue}
navigate={this.props.navigate}
/>
</View>
)
}
}
}