Metrics bar styling.
This commit is contained in:
@@ -61,3 +61,7 @@
|
||||
color: var(--red700);
|
||||
background: var(--red100);
|
||||
}
|
||||
|
||||
.hide {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ export const MetricCard = ({
|
||||
reverseColors = false,
|
||||
format = formatNumber,
|
||||
showLabel = true,
|
||||
showChange = true,
|
||||
showChange = false,
|
||||
showPrevious = false,
|
||||
className,
|
||||
}: MetricCardProps) => {
|
||||
@@ -45,6 +45,7 @@ export const MetricCard = ({
|
||||
className={classNames(styles.change, {
|
||||
[styles.positive]: positive,
|
||||
[styles.negative]: negative,
|
||||
[styles.hide]: ~~change === 0,
|
||||
})}
|
||||
>
|
||||
<Icon rotate={positive ? -45 : 45} size={showPrevious ? 'sm' : 'xs'}>
|
||||
|
||||
Reference in New Issue
Block a user