Merge branch 'master' into link-nfp-rules
This commit is contained in:
@@ -167,10 +167,7 @@ export default class CycleDayOverView extends Component {
|
||||
}
|
||||
|
||||
const symptomValue = cycleDay[symptomName]
|
||||
const label = l[symptomName](symptomValue)
|
||||
if (!label) return
|
||||
if (label.length < 45) return label
|
||||
return label.slice(0, 42) + '...'
|
||||
return l[symptomName](symptomValue)
|
||||
}
|
||||
|
||||
render() {
|
||||
@@ -293,7 +290,10 @@ class SymptomBox extends Component {
|
||||
</AppText>
|
||||
</View>
|
||||
<View style={[styles.symptomDataBox, disabledStyle]}>
|
||||
<AppText style={styles.symptomDataText}>{this.props.data}</AppText>
|
||||
<AppText
|
||||
style={styles.symptomDataText}
|
||||
numberOfLines={3}
|
||||
>{this.props.data}</AppText>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
)
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
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 labels from '../../../i18n/en/symptom-info.js'
|
||||
import FramedSegment from '../../framed-segment'
|
||||
import styles from '../../../styles/index'
|
||||
|
||||
export default class InfoSymptom extends Component {
|
||||
render() {
|
||||
@@ -14,6 +12,7 @@ export default class InfoSymptom extends Component {
|
||||
BleedingEditView: 'bleeding',
|
||||
CervixEditView: 'cervix',
|
||||
DesireEditView: 'desire',
|
||||
MoodEditView: 'mood',
|
||||
MucusEditView: 'mucus',
|
||||
NoteEditView: 'note',
|
||||
PainEditView: 'pain',
|
||||
@@ -21,22 +20,15 @@ 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>
|
||||
<FramedSegment
|
||||
style={styles.framedSegmentLast}
|
||||
title={labels[currentSymptom].title}
|
||||
>
|
||||
<AppText>{labels[currentSymptom].text}</AppText>
|
||||
</FramedSegment>
|
||||
</ScrollView>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user