Implements SettingsSegment Boxes for info symptom texts

This commit is contained in:
emelko
2019-01-28 01:34:50 +01:00
parent 2e400c2dde
commit 9c56c04432
+6 -19
View File
@@ -1,11 +1,8 @@
import React, { Component } from 'react'
import {
View,
ScrollView
} from 'react-native'
import styles from '../../../styles'
import { ScrollView } from 'react-native'
import AppText from '../../app-text'
import * as labels from '../../../i18n/en/symptom-info.js'
import SettingsSegment from '../../settings/shared/settings-segment'
export default class InfoSymptom extends Component {
render() {
@@ -21,22 +18,12 @@ export default class InfoSymptom extends Component {
TemperatureEditView: 'temperature'
}
const currentSymptom = symptomMapping[symptomView]
const currentSymptomText = labels.symptomInfo[currentSymptom]
const currentSymptomTitle = labels.symptomTitle[currentSymptom]
return (
<ScrollView>
<View style={[styles.textWrappingView]}>
<AppText style={styles.title}>
{currentSymptomTitle}
</AppText>
<AppText style={styles.paragraph}>
{currentSymptomText}
{labels.symptomTitle.currentSymptomTitle}
</AppText>
<AppText style={styles.paragraph}>
{labels.symptomInfo.currentSymptomText}
</AppText>
</View>
<SettingsSegment title={labels.symptomTitle[currentSymptom]}>
<AppText>{labels.symptomInfo[currentSymptom]}</AppText>
</SettingsSegment>
</ScrollView>
)
}