Function
Stat
({
label,
value,
hint,
title,
variant = "default",
className,
}: {
label: string;
value: React.ReactNode;
hint?: string;
/** Native tooltip text for the whole tile; sets cursor: help when present. */
title?: string;
variant?: "default" | "compact";
className?: string;
})
Source from the content-addressed store, hash-verified
| 76 | * (and a `help` cursor) on the whole tile — used by holographic stat rows that |
| 77 | * need to explain what a number means without adding visible chrome. */ |
| 78 | export function Stat({ |
| 79 | label, |
| 80 | value, |
| 81 | hint, |
| 82 | title, |
| 83 | variant = "default", |
| 84 | className, |
| 85 | }: { |
| 86 | label: string; |
| 87 | value: React.ReactNode; |
| 88 | hint?: string; |
| 89 | /** Native tooltip text for the whole tile; sets cursor: help when present. */ |
| 90 | title?: string; |
| 91 | variant?: "default" | "compact"; |
| 92 | className?: string; |
| 93 | }) { |
| 94 | return ( |
| 95 | <div |
| 96 | className={cn("tdp-stat", variant === "compact" && "tdp-stat-compact", className)} |
| 97 | title={title} |
| 98 | > |
| 99 | <div className="tdp-stat-value">{value}</div> |
| 100 | <div className="tdp-stat-label">{label}</div> |
| 101 | {hint && <div className="tdp-stat-hint">{hint}</div>} |
| 102 | </div> |
| 103 | ); |
| 104 | } |
| 105 | |
| 106 | /** Label/value bar list of optionally-pickable rows. */ |
| 107 | export function BarList<Row extends Record<string, unknown>>({ |
Callers
nothing calls this directly
Tested by
no test coverage detected