Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 37x 1066x | import React from "react";
const StatItem: React.FC<{
label: string;
value: number;
loading?: boolean;
}> = ({ label, value, loading }) => (
<div className="flex items-baseline gap-1.5">
<span
className={`text-sm font-semibold tabular-nums text-gray-800 dark:text-gray-200 ${loading ? "opacity-0" : ""}`}
>
{loading ? "—" : value}
</span>
<span className="text-xs text-gray-400 dark:text-gray-500">{label}</span>
</div>
);
export default StatItem;
|