mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 09:05:36 +01:00
Responsive updates.
This commit is contained in:
parent
53b23420a4
commit
94ed67e339
20 changed files with 100 additions and 77 deletions
|
|
@ -10,12 +10,13 @@ const MetricCard = ({
|
|||
reverseColors = false,
|
||||
format = formatNumber,
|
||||
hideComparison = false,
|
||||
className,
|
||||
}) => {
|
||||
const props = useSpring({ x: Number(value) || 0, from: { x: 0 } });
|
||||
const changeProps = useSpring({ x: Number(change) || 0, from: { x: 0 } });
|
||||
|
||||
return (
|
||||
<div className={styles.card}>
|
||||
<div className={classNames(styles.card, className)}>
|
||||
<animated.div className={styles.value}>{props.x.to(x => format(x))}</animated.div>
|
||||
<div className={styles.label}>
|
||||
{label}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue