0d30c58bf0
Snapshot of the working tree on srv1071960 (branch main), taken during server cleanup. .env files, node_modules, builds, logs and media were excluded.
15 lines
459 B
TypeScript
15 lines
459 B
TypeScript
import { Badge, type Tone } from "../ui/Badge";
|
|
import { statusLabel } from "../../lib/format";
|
|
import type { DcrStatus, ReportType } from "../../types";
|
|
|
|
const TONE: Record<DcrStatus, Tone> = {
|
|
DRAFT: "neutral",
|
|
PENDING_ABM: "warning",
|
|
RETURNED: "danger",
|
|
APPROVED: "success",
|
|
};
|
|
|
|
export function StatusBadge({ status, type }: { status: DcrStatus; type?: ReportType }) {
|
|
return <Badge tone={TONE[status]} dot>{statusLabel(status, type)}</Badge>;
|
|
}
|