--
This commit is contained in:
@@ -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>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user