Production
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { Badge, type Tone } from "../ui/Badge";
|
||||
import { STATUS_LABEL } from "../../lib/format";
|
||||
import type { DcrStatus } from "../../types";
|
||||
|
||||
const TONE: Record<DcrStatus, Tone> = {
|
||||
DRAFT: "neutral",
|
||||
PENDING_AM: "warning",
|
||||
RETURNED: "danger",
|
||||
APPROVED: "success",
|
||||
};
|
||||
|
||||
export function StatusBadge({ status }: { status: DcrStatus }) {
|
||||
return <Badge tone={TONE[status]} dot>{STATUS_LABEL[status]}</Badge>;
|
||||
}
|
||||
Reference in New Issue
Block a user