diff --git a/components/cycle-day/cycle-day-overview.js b/components/cycle-day/cycle-day-overview.js index 2c6916f67fa74448788a29868470bdd6739c5cf3..baccc503db2dda8583d7430950fbc825f5446646 100644 --- a/components/cycle-day/cycle-day-overview.js +++ b/components/cycle-day/cycle-day-overview.js @@ -187,24 +187,20 @@ class SymptomBox extends Component { const d = this.props.data const boxActive = d ? styles.symptomBoxActive : {} const iconActive = d ? iconStyles.symptomBoxActive : {} + const iconStyle = Object.assign({}, iconStyles.symptomBox, iconActive, disabledStyle) const textActive = d ? styles.symptomTextActive : {} const disabledStyle = this.props.disabled ? styles.symptomInFuture : {} - const symptomBoxStyle = Object.assign({}, styles.symptomBox, boxActive, disabledStyle) - const iconStyle = Object.assign({}, iconStyles.symptomBox, iconActive, disabledStyle) - const symptomDataBoxStyle = Object.assign({}, styles.symptomDataBox, disabledStyle) - const textStyle = Object.assign({}, textActive, disabledStyle) - return ( <TouchableOpacity onPress={this.props.onPress} disabled={this.props.disabled}> - <View style={symptomBoxStyle}> + <View style={[styles.symptomBox, boxActive, disabledStyle]}> <Icon name='thermometer' {...iconStyle} /> - <Text style={textStyle}>{this.props.title}</Text> + <Text style={[textActive, disabledStyle]}>{this.props.title}</Text> </View> - <View style={symptomDataBoxStyle}> + <View style={[styles.symptomDataBox, disabledStyle]}> <Text style={styles.symptomDataText}>{this.props.data}</Text> </View> </TouchableOpacity>