mirror of
https://github.com/umami-software/umami.git
synced 2026-02-19 12:05:41 +01:00
Update ListTable.tsx
This commit is contained in:
parent
e93cc9429e
commit
99f4a72e80
1 changed files with 5 additions and 1 deletions
|
|
@ -99,13 +99,17 @@ const AnimatedRow = ({ label, value = 0, percent, change, animate, showPercentag
|
||||||
<animated.div
|
<animated.div
|
||||||
className={styles.value}
|
className={styles.value}
|
||||||
title={props?.y.to((n: number) => intl.formatNumber(n))}
|
title={props?.y.to((n: number) => intl.formatNumber(n))}
|
||||||
|
style={{ fontVariantNumeric: 'tabular-nums' }}
|
||||||
>
|
>
|
||||||
{props.y?.to((n: number) => intl.formatNumber(n, formatLongNumberOptions(n)))}
|
{props.y?.to((n: number) => intl.formatNumber(n, formatLongNumberOptions(n)))}
|
||||||
</animated.div>
|
</animated.div>
|
||||||
</div>
|
</div>
|
||||||
{showPercentage && (
|
{showPercentage && (
|
||||||
<div className={styles.percent}>
|
<div className={styles.percent}>
|
||||||
<animated.div className={styles.bar} style={{ width: props.width.to(n => `${n}%`) }} />
|
<animated.div
|
||||||
|
className={styles.bar}
|
||||||
|
style={{ width: props.width.to(n => `${n}%`), fontVariantNumeric: 'tabular-nums' }}
|
||||||
|
/>
|
||||||
<animated.span>
|
<animated.span>
|
||||||
{props.width.to(n => intl.formatNumber(n / 100, { style: 'percent' }))}
|
{props.width.to(n => intl.formatNumber(n / 100, { style: 'percent' }))}
|
||||||
</animated.span>
|
</animated.span>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue