Add messages for devices.

This commit is contained in:
Mike Cao 2023-03-09 15:18:54 -08:00
parent 0d6da743b9
commit c3426a67ee
5 changed files with 23 additions and 18 deletions

View file

@ -90,16 +90,13 @@ const AnimatedRow = ({
<div className={styles.row}>
<div className={styles.label}>{label}</div>
<div className={styles.value} onClick={onClick}>
<animated.div className={styles.value}>{props.y?.interpolate(format)}</animated.div>
<animated.div className={styles.value}>{props.y?.to(format)}</animated.div>
</div>
{showPercentage && (
<div className={styles.percent}>
<animated.div
className={styles.bar}
style={{ width: props.width.interpolate(n => `${n}%`) }}
/>
<animated.div className={styles.bar} style={{ width: props.width.to(n => `${n}%`) }} />
<animated.span className={styles.percentValue}>
{props.width.interpolate(n => `${n.toFixed(0)}%`)}
{props.width.to(n => `${n.toFixed(0)}%`)}
</animated.span>
</div>
)}