Metrics bar styling.

This commit is contained in:
Mike Cao 2024-05-23 00:58:31 -07:00
parent df66acaacf
commit 24af06f3aa
7 changed files with 16 additions and 8 deletions

View file

@ -61,3 +61,7 @@
color: var(--red700);
background: var(--red100);
}
.hide {
visibility: hidden;
}

View file

@ -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'}>