mirror of
https://github.com/umami-software/umami.git
synced 2026-02-06 05:37:20 +01:00
Metrics bar styling.
This commit is contained in:
parent
df66acaacf
commit
24af06f3aa
7 changed files with 16 additions and 8 deletions
|
|
@ -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'}>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue