- Engine: Add ppa_revenue_cr, mcp_revenue_cr, tariff, units to PnLRow - Engine: Split PPA vs MCP revenue in P&L computation - Web: Collapsible rows for PPA/MCP Revenue and Opex - Web: Highlighted rows (Total Revenue, EBITDA, EBIT, PBT, PAT) - Web: Units above Tariff in breakdown, bg-blue-50 highlight - Fix sticky column z-index for horizontal scroll - CLAUDE.md: Add project documentation Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
26 lines
767 B
TypeScript
26 lines
767 B
TypeScript
interface KpiCardProps {
|
|
label: string;
|
|
value: string | null;
|
|
unit?: string;
|
|
highlight?: boolean;
|
|
}
|
|
|
|
export function KpiCard({ label, value, unit, highlight }: KpiCardProps) {
|
|
return (
|
|
<div
|
|
className={`border rounded-lg p-4 flex flex-col gap-1 ${highlight ? "border-primary/40 bg-primary/5" : ""}`}
|
|
>
|
|
<span className="text-xs text-muted-foreground font-medium uppercase tracking-wide">
|
|
{label}
|
|
</span>
|
|
<span className="text-2xl font-bold tabular-nums">
|
|
{value ?? <span className="text-muted-foreground text-base">—</span>}
|
|
{value && unit && (
|
|
<span className="text-sm font-normal text-muted-foreground ml-1">
|
|
{unit}
|
|
</span>
|
|
)}
|
|
</span>
|
|
</div>
|
|
);
|
|
}
|