Implements SettingsSegment Boxes for info symptom texts
This commit is contained in:
@@ -1,11 +1,8 @@
|
|||||||
import React, { Component } from 'react'
|
import React, { Component } from 'react'
|
||||||
import {
|
import { ScrollView } from 'react-native'
|
||||||
View,
|
|
||||||
ScrollView
|
|
||||||
} from 'react-native'
|
|
||||||
import styles from '../../../styles'
|
|
||||||
import AppText from '../../app-text'
|
import AppText from '../../app-text'
|
||||||
import * as labels from '../../../i18n/en/symptom-info.js'
|
import * as labels from '../../../i18n/en/symptom-info.js'
|
||||||
|
import SettingsSegment from '../../settings/shared/settings-segment'
|
||||||
|
|
||||||
export default class InfoSymptom extends Component {
|
export default class InfoSymptom extends Component {
|
||||||
render() {
|
render() {
|
||||||
@@ -21,22 +18,12 @@ export default class InfoSymptom extends Component {
|
|||||||
TemperatureEditView: 'temperature'
|
TemperatureEditView: 'temperature'
|
||||||
}
|
}
|
||||||
const currentSymptom = symptomMapping[symptomView]
|
const currentSymptom = symptomMapping[symptomView]
|
||||||
const currentSymptomText = labels.symptomInfo[currentSymptom]
|
|
||||||
const currentSymptomTitle = labels.symptomTitle[currentSymptom]
|
|
||||||
return (
|
return (
|
||||||
<ScrollView>
|
<ScrollView>
|
||||||
<View style={[styles.textWrappingView]}>
|
<SettingsSegment title={labels.symptomTitle[currentSymptom]}>
|
||||||
<AppText style={styles.title}>
|
<AppText>{labels.symptomInfo[currentSymptom]}</AppText>
|
||||||
{currentSymptomTitle}
|
</SettingsSegment>
|
||||||
</AppText>
|
|
||||||
<AppText style={styles.paragraph}>
|
|
||||||
{currentSymptomText}
|
|
||||||
{labels.symptomTitle.currentSymptomTitle}
|
|
||||||
</AppText>
|
|
||||||
<AppText style={styles.paragraph}>
|
|
||||||
{labels.symptomInfo.currentSymptomText}
|
|
||||||
</AppText>
|
|
||||||
</View>
|
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user