diff --git a/components/app-text.js b/components/app-text.js index 8311d39e812f53ffa56637fdbb1babced22e2de9..079d9c7a3b165f1c8e8e6c164e02be2f1c1293af 100644 --- a/components/app-text.js +++ b/components/app-text.js @@ -7,6 +7,7 @@ export default function AppText(props) { <Text style={[styles.appText, props.style]} onPress={props.onPress} + numberOfLines={props.numberOfLines} > {props.children} </Text> diff --git a/components/cycle-day/cycle-day-overview.js b/components/cycle-day/cycle-day-overview.js index dd5dd10d3d0f8073ae7930ba4aaf702dae517e6c..75036c4b927f76316e1b84ae80ec842bab095537 100644 --- a/components/cycle-day/cycle-day-overview.js +++ b/components/cycle-day/cycle-day-overview.js @@ -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> )