Stat unit sized against the hero numerals: dui-hero on the readout's outer span, so the unit's 0.4em is of the hero rather than the 14px body text
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WgBfkm4rCmtd1T4vHWjEPx
This commit is contained in:
@@ -31,13 +31,14 @@ export function Readout({
|
|||||||
}: ReadoutProps) {
|
}: ReadoutProps) {
|
||||||
const { label, numeric } = useAnimatedNumber(value, precision)
|
const { label, numeric } = useAnimatedNumber(value, precision)
|
||||||
return (
|
return (
|
||||||
<span data-testid="readout" className="flex min-w-0 items-baseline gap-1.5">
|
<span
|
||||||
<span
|
data-testid="readout"
|
||||||
className={cn(
|
className={cn(
|
||||||
"min-w-0 truncate",
|
"flex min-w-0 items-baseline gap-1.5",
|
||||||
size === "hero" ? "dui-hero" : "tabular-nums",
|
size === "hero" && "dui-hero",
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
<span className="min-w-0 truncate tabular-nums">
|
||||||
{numeric ? (
|
{numeric ? (
|
||||||
<motion.span>{label}</motion.span>
|
<motion.span>{label}</motion.span>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -30,13 +30,14 @@ export function Readout({
|
|||||||
}: ReadoutProps) {
|
}: ReadoutProps) {
|
||||||
const { label, numeric } = useAnimatedNumber(value, precision)
|
const { label, numeric } = useAnimatedNumber(value, precision)
|
||||||
return (
|
return (
|
||||||
<span data-testid="readout" className="flex min-w-0 items-baseline gap-1.5">
|
<span
|
||||||
<span
|
data-testid="readout"
|
||||||
className={cn(
|
className={cn(
|
||||||
"min-w-0 truncate",
|
"flex min-w-0 items-baseline gap-1.5",
|
||||||
size === "hero" ? "dui-hero" : "tabular-nums",
|
size === "hero" && "dui-hero",
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
<span className="min-w-0 truncate tabular-nums">
|
||||||
{numeric ? (
|
{numeric ? (
|
||||||
<motion.span>{label}</motion.span>
|
<motion.span>{label}</motion.span>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -29,13 +29,14 @@ export function Readout({
|
|||||||
}: ReadoutProps) {
|
}: ReadoutProps) {
|
||||||
const { label, numeric } = useAnimatedNumber(value, precision)
|
const { label, numeric } = useAnimatedNumber(value, precision)
|
||||||
return (
|
return (
|
||||||
<span data-testid="readout" className="flex min-w-0 items-baseline gap-1.5">
|
<span
|
||||||
<span
|
data-testid="readout"
|
||||||
className={cn(
|
className={cn(
|
||||||
"min-w-0 truncate",
|
"flex min-w-0 items-baseline gap-1.5",
|
||||||
size === "hero" ? "dui-hero" : "tabular-nums",
|
size === "hero" && "dui-hero",
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
<span className="min-w-0 truncate tabular-nums">
|
||||||
{numeric ? (
|
{numeric ? (
|
||||||
<motion.span>{label}</motion.span>
|
<motion.span>{label}</motion.span>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
Reference in New Issue
Block a user