);
} else {
const measure = data[0];
- const percentChange = percIncrease(measure.previous_total * 1, measure.total * 1);
+ const percentChange = measure.previous_total && percIncrease(measure.previous_total * 1, measure.total * 1);
content = (
<React.Fragment>
- <span className='sparkline__value__total'><FormattedNumber value={measure.total} /></span>
- <span className={classNames('sparkline__value__change', { positive: percentChange > 0, negative: percentChange < 0 })}>{percentChange > 0 && '+'}<FormattedNumber value={percentChange} style='percent' /></span>
+ <span className='sparkline__value__total'>{measure.human_value || <FormattedNumber value={measure.total} />}</span>
+ {measure.previous_total && (<span className={classNames('sparkline__value__change', { positive: percentChange > 0, negative: percentChange < 0 })}>{percentChange > 0 && '+'}<FormattedNumber value={percentChange} style='percent' /></span>)}
</React.Fragment>
);
}
}
}
+ .positive-hint,
+ .negative-hint,
+ .neutral-hint {
+ a {
+ color: inherit;
+ text-decoration: underline;
+
+ &:focus,
+ &:hover,
+ &:active {
+ text-decoration: none;
+ }
+ }
+ }
+
.positive-hint {
color: $valid-value-color;
font-weight: 500;
}
}
}
+
+.availability-indicator {
+ display: flex;
+ align-items: center;
+ margin-bottom: 30px;
+ font-size: 14px;
+ line-height: 21px;
+
+ &__hint {
+ padding: 0 15px;
+ }
+
+ &__graphic {
+ display: flex;
+ margin: 0 -2px;
+
+ &__item {
+ display: block;
+ flex: 0 0 auto;
+ width: 4px;
+ height: 21px;
+ background: lighten($ui-base-color, 8%);
+ margin: 0 2px;
+ border-radius: 2px;
+
+ &.positive {
+ background: $valid-value-color;
+ }
+
+ &.negative {
+ background: $error-value-color;
+ }
+ }
+ }
+}
}
}
+ &.horizontal-table {
+ border-collapse: collapse;
+ border-style: hidden;
+
+ & > tbody > tr > th,
+ & > tbody > tr > td {
+ padding: 11px 10px;
+ background: transparent;
+ border: 1px solid lighten($ui-base-color, 8%);
+ color: $secondary-text-color;
+ }
+
+ & > tbody > tr > th {
+ color: $darker-text-color;
+ font-weight: 600;
+ }
+ }
+
&.batch-table {
& > thead > tr > th {
background: $ui-base-color;