Add explainer to pain
This commit is contained in:
@@ -8,30 +8,32 @@ import { saveSymptom } from '../../../db'
|
|||||||
import { pain as labels } from '../labels/labels'
|
import { pain as labels } from '../labels/labels'
|
||||||
import ActionButtonFooter from './action-button-footer'
|
import ActionButtonFooter from './action-button-footer'
|
||||||
import SelectBoxGroup from '../select-box-group'
|
import SelectBoxGroup from '../select-box-group'
|
||||||
|
import SymptomSection from './symptom-section'
|
||||||
|
|
||||||
|
const categories = labels.categories
|
||||||
const boxes = [{
|
const boxes = [{
|
||||||
label: labels.cramps,
|
label: categories.cramps,
|
||||||
stateKey: 'cramps'
|
stateKey: 'cramps'
|
||||||
}, {
|
}, {
|
||||||
label: labels.ovulationPain,
|
label: categories.ovulationPain,
|
||||||
stateKey: 'ovulationPain'
|
stateKey: 'ovulationPain'
|
||||||
}, {
|
}, {
|
||||||
label: labels.headache,
|
label: categories.headache,
|
||||||
stateKey: 'headache'
|
stateKey: 'headache'
|
||||||
}, {
|
}, {
|
||||||
label: labels.backache,
|
label: categories.backache,
|
||||||
stateKey: 'backache'
|
stateKey: 'backache'
|
||||||
}, {
|
}, {
|
||||||
label: labels.nausea,
|
label: categories.nausea,
|
||||||
stateKey: 'nausea'
|
stateKey: 'nausea'
|
||||||
}, {
|
}, {
|
||||||
label: labels.tenderBreasts,
|
label: categories.tenderBreasts,
|
||||||
stateKey: 'tenderBreasts'
|
stateKey: 'tenderBreasts'
|
||||||
}, {
|
}, {
|
||||||
label: labels.migraine,
|
label: categories.migraine,
|
||||||
stateKey: 'migraine'
|
stateKey: 'migraine'
|
||||||
}, {
|
}, {
|
||||||
label: labels.other,
|
label: categories.other,
|
||||||
stateKey: 'other'
|
stateKey: 'other'
|
||||||
}]
|
}]
|
||||||
|
|
||||||
@@ -60,7 +62,9 @@ export default class Pain extends Component {
|
|||||||
return (
|
return (
|
||||||
<View style={{ flex: 1 }}>
|
<View style={{ flex: 1 }}>
|
||||||
<ScrollView>
|
<ScrollView>
|
||||||
<View>
|
<SymptomSection
|
||||||
|
explainer={labels.explainer}
|
||||||
|
>
|
||||||
<SelectBoxGroup
|
<SelectBoxGroup
|
||||||
data={boxes}
|
data={boxes}
|
||||||
onSelect={this.toggleState}
|
onSelect={this.toggleState}
|
||||||
@@ -77,7 +81,7 @@ export default class Pain extends Component {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
</View>
|
</SymptomSection>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
<ActionButtonFooter
|
<ActionButtonFooter
|
||||||
symptom='pain'
|
symptom='pain'
|
||||||
|
|||||||
Reference in New Issue
Block a user