22 lines
476 B
TypeScript
22 lines
476 B
TypeScript
import { Card } from "@/components/ui/card";
|
|
|
|
export function KpiCard({
|
|
label,
|
|
value,
|
|
sub,
|
|
}: {
|
|
label: string;
|
|
value: string;
|
|
sub?: string;
|
|
}) {
|
|
return (
|
|
<Card className="p-4">
|
|
<div className="text-xs font-medium text-muted-foreground">{label}</div>
|
|
<div className="mt-1 text-2xl font-semibold tabular-nums">{value}</div>
|
|
{sub ? (
|
|
<div className="mt-0.5 text-xs text-muted-foreground">{sub}</div>
|
|
) : null}
|
|
</Card>
|
|
);
|
|
}
|