Newer
Older
import React, { Component } from 'react'
import {
View,
TextInput,
} from 'react-native'
import styles from '../../../styles'
import { saveSymptom } from '../../../db'
import ActionButtonFooter from './action-button-footer'
import { noteExplainer } from '../../../i18n/en/cycle-day'
import { shared } from '../../../i18n/en/labels'
export default class Note extends Component {
const cycleDay = props.cycleDay
this.note = cycleDay && cycleDay.note
this.makeActionButtons = props.makeActionButtons
this.state = {
currentValue: this.note && this.note.value || ''
<ScrollView style={styles.page}>
autoFocus={!this.state.currentValue}
placeholder={shared.enter}
onChangeText={(val) => {
this.setState({ currentValue: val })
}}
value={this.state.currentValue}
/>
<ActionButtonFooter
symptom='note'
date={this.props.date}
currentSymptomValue={this.note}
saveAction={() => {
value: this.state.currentValue
})
}}
saveDisabled={!this.state.currentValue}
navigate={this.props.navigate}
/>