- New shared TacticalFrame/ReadoutFooter primitives (classification strip, corner brackets, faint grid texture, mono readout bar) following the campaign-card recipe; each piece separable per widget - ProfileSummary: full frame + service-record readout footer (XP/level/rank/assignments) - MissionBriefing: frame + codename line, inner MissionCard kept conventional - QuickStats: hairline-separated situation-report readout bar - Dense widgets (events, tickets, notifications, wallet, negotiations) stay shadcn so the tactical surfaces stand out
52 lines
1.8 KiB
TypeScript
52 lines
1.8 KiB
TypeScript
import type { LucideIcon } from "lucide-react";
|
|
import { Building2Icon, CrosshairIcon, ShieldIcon, UsersIcon } from "lucide-react";
|
|
import { TacticalFrame } from "./tactical";
|
|
|
|
interface QuickStatsProps {
|
|
activeCampaigns: number;
|
|
totalMissions: number;
|
|
totalStructures: number;
|
|
totalFactions: number;
|
|
totalMembers: number;
|
|
}
|
|
|
|
interface StatCell {
|
|
label: string;
|
|
value: number;
|
|
icon: LucideIcon;
|
|
}
|
|
|
|
export function QuickStats({
|
|
activeCampaigns,
|
|
totalMissions,
|
|
totalStructures,
|
|
totalFactions,
|
|
totalMembers,
|
|
}: QuickStatsProps) {
|
|
const cells: StatCell[] = [
|
|
{ label: "Campaigns", value: activeCampaigns, icon: CrosshairIcon },
|
|
{ label: "Missions", value: totalMissions, icon: CrosshairIcon },
|
|
{ label: "Structures", value: totalStructures, icon: Building2Icon },
|
|
{ label: "Factions", value: totalFactions, icon: ShieldIcon },
|
|
{ label: "Operators", value: totalMembers, icon: UsersIcon },
|
|
];
|
|
|
|
return (
|
|
<TacticalFrame classification="Theater // Situation Report" brackets={false}>
|
|
{/* gap-px over a white/10 backdrop renders hairline separators in both directions */}
|
|
<div className="grid grid-cols-2 gap-px bg-white/10 sm:grid-cols-3 2xl:grid-cols-5">
|
|
{cells.map((cell) => (
|
|
<div key={cell.label} className="flex flex-col gap-1 bg-card px-4 py-3">
|
|
<span className="font-mono text-xl leading-none tabular-nums text-foreground">
|
|
{cell.value.toLocaleString()}
|
|
</span>
|
|
<span className="flex items-center gap-1.5 text-[9px] uppercase tracking-widest text-muted-foreground">
|
|
<cell.icon aria-hidden="true" className="size-3 opacity-60" />
|
|
{cell.label}
|
|
</span>
|
|
</div>
|
|
))}
|
|
</div>
|
|
</TacticalFrame>
|
|
);
|
|
}
|