@hedia/recommendation-screen 2.1.58-alpha.0 → 2.1.59-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -462,7 +462,7 @@ export default class RecommendationScreen extends React.Component {
|
|
|
462
462
|
const { ActiveInsulin: ActiveInsulinUnitTestID, BloodGlucose: BGUnitTestID, BloodKetone: BKUnitTestID, } = InfoBarTestIds.Unit;
|
|
463
463
|
const carbRecommendation = carbRecommendationProp !== null ? Math.round(carbRecommendationProp) : null;
|
|
464
464
|
const recommendedCarbs = enteredCarbs ?? carbRecommendation;
|
|
465
|
-
const
|
|
465
|
+
const foodBorderColor = recommendedCarbs !== null && recommendedCarbs > 0 ? colors.teal : colors.dustyDarkBlue;
|
|
466
466
|
const { calculatorParams, bloodGlucoseUnit, currentBKL, bloodKetoneUnit } = this.props;
|
|
467
467
|
const { currentBGL, carbohydrates: providedCarbs } = calculatorParams;
|
|
468
468
|
const displayedBGL = currentBGL ? Utils.displayedBGLValue(currentBGL, bloodGlucoseUnit) : null;
|
|
@@ -477,7 +477,7 @@ export default class RecommendationScreen extends React.Component {
|
|
|
477
477
|
<InfoBars label={i18n._(t `Active Insulin`)} value={activeInsulin ? `${activeInsulin.toFixed(1)}` : null} unit={i18n._(t `units`)} showNullAsDash={false} testID={{ unitID: ActiveInsulinUnitTestID, valueID: ActiveInsulinValueTestID }}/>
|
|
478
478
|
<InfoBars label={i18n._(t `Blood Glucose Level`)} value={displayedBGL} unit={this.props.bloodGlucoseUnit} showNullAsDash={true} testID={{ unitID: BGUnitTestID, valueID: BGValueTestID }}/>
|
|
479
479
|
<InfoBars label={i18n._(t `Blood Ketone Level`)} value={displayedBKL} unit={this.props.bloodKetoneUnit} showNullAsDash={true} testID={{ unitID: BKUnitTestID, valueID: BKValueTestID }}/>
|
|
480
|
-
<View style={[styles.carbsBorder, { borderColor }]}>
|
|
480
|
+
<View style={[styles.carbsBorder, { borderColor: foodBorderColor }]}>
|
|
481
481
|
<RecommendedCarbs enteredCarbs={`${providedCarbs}`} changedRecommendedCarbs={this.updateCarbRecommendation} recommendedCarbs={`${recommendedCarbs}`} removeRecommendedCarbs={this.removeCarbRecommendation}/>
|
|
482
482
|
</View>
|
|
483
483
|
{this.props.calculatorParams.activity && this.props.activityDisplayProps && (<Activity activity={this.props.calculatorParams.activity} activityType={this.props.activityDisplayProps.activityType} activityTitle={this.props.activityDisplayProps.activityTitle} activityReduction={this.state.activityReduction}/>)}
|