This commit is contained in:
Shubhankar45
2026-10-27 12:03:31 +00:00
parent 2ed3945b5d
commit 4e5e95775d
104 changed files with 5210 additions and 606 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
import { Badge, type Tone } from "../ui/Badge";
import { STATUS_LABEL } from "../../lib/format";
import type { DcrStatus } from "../../types";
import { statusLabel } from "../../lib/format";
import type { DcrStatus, ReportType } from "../../types";
const TONE: Record<DcrStatus, Tone> = {
DRAFT: "neutral",
@@ -9,6 +9,6 @@ const TONE: Record<DcrStatus, Tone> = {
APPROVED: "success",
};
export function StatusBadge({ status }: { status: DcrStatus }) {
return <Badge tone={TONE[status]} dot>{STATUS_LABEL[status]}</Badge>;
export function StatusBadge({ status, type }: { status: DcrStatus; type?: ReportType }) {
return <Badge tone={TONE[status]} dot>{statusLabel(status, type)}</Badge>;
}