papertrail/components/claims/StatusBadge.tsx
caelum0x 695a365ae4 feat: PaperTrail — enterprise evidence-verification platform
Multi-tenant platform (182 pages, 228 API routes, ~30 modules) built on a
deterministic verification core: clinical-trial claims checked against
ClinicalTrials.gov registered results and raw event counts (ARR/NNT/RR+CI
recomputed in code, oracle-tested), code-enforced exact-span grounding, and
multi-source cross-verification. Auth/RBAC/multi-tenancy, document processing
at scale (unpdf + Docling), agentic workflows, Claude Science connector,
compliance/audit, billing, public API, and more.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 07:21:22 +03:00

45 lines
1.2 KiB
TypeScript

// Presentational status badge for a claim's lifecycle state. Pure: maps a status
// string to Tailwind classes and a human label. Unknown statuses render neutrally.
interface StatusBadgeProps {
status: string;
}
const STATUS_STYLES: Record<string, { label: string; classes: string }> = {
draft: { label: "Draft", classes: "bg-ink/5 text-ink/60 border-ink/15" },
submitted: {
label: "Submitted",
classes: "bg-blue-50 text-blue-700 border-blue-200",
},
verifying: {
label: "Verifying",
classes: "bg-yellow-50 text-yellow-800 border-yellow-200",
},
verified: {
label: "Verified",
classes: "bg-green-50 text-green-700 border-green-200",
},
flagged: {
label: "Flagged",
classes: "bg-red-50 text-red-700 border-red-200",
},
archived: {
label: "Archived",
classes: "bg-ink/5 text-ink/40 border-ink/10",
},
};
export function StatusBadge({ status }: StatusBadgeProps) {
const style = STATUS_STYLES[status] ?? {
label: status,
classes: "bg-ink/5 text-ink/60 border-ink/15",
};
return (
<span
className={`inline-flex items-center rounded-full border px-2 py-0.5 text-xs font-medium ${style.classes}`}
>
{style.label}
</span>
);
}