From d6ce972052f8ab7c0be466e687388e2a37471a8c Mon Sep 17 00:00:00 2001 From: arsam Date: Fri, 18 Sep 2026 23:10:41 +0330 Subject: [PATCH] Import source: src/components/common/status-badge Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality. --- src/components/common/status-badge.tsx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/components/common/status-badge.tsx diff --git a/src/components/common/status-badge.tsx b/src/components/common/status-badge.tsx new file mode 100644 index 0000000..4892630 --- /dev/null +++ b/src/components/common/status-badge.tsx @@ -0,0 +1,18 @@ +import type { Status } from "@/api/contracts/models"; +import { Badge } from "@/components/ui/badge"; + +export function StatusBadge({ + status, +}: { + status: Status | "open" | "acknowledged" | "resolved"; +}) { + const variant = + status === "healthy" || status === "resolved" + ? "success" + : status === "warning" || status === "maintenance" || status === "acknowledged" + ? "warning" + : status === "critical" || status === "open" + ? "danger" + : "outline"; + return {status}; +}