import React, { Component } from 'react' import { View, ScrollView, TextInput, } from 'react-native' import styles from '../../../styles' import { saveSymptom } from '../../../db' import ActionButtonFooter from './action-button-footer' import SymptomSection from './symptom-section' import { noteExplainer } from '../../../copy/en/cycle-day' export default class Note extends Component { constructor(props) { super(props) const cycleDay = props.cycleDay this.note = cycleDay && cycleDay.note this.makeActionButtons = props.makeActionButtons this.state = { currentValue: this.note && this.note.value || '' } } render() { return ( { this.setState({ currentValue: val }) }} value={this.state.currentValue} /> { saveSymptom('note', this.props.date, { value: this.state.currentValue }) }} saveDisabled={!this.state.currentValue} navigate={this.props.navigate} /> ) } }