Sanitized mirror from private repository - 2026-04-05 08:31:50 UTC
This commit is contained in:
28
dashboard/ui/components/status-badge.tsx
Normal file
28
dashboard/ui/components/status-badge.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const colorMap: Record<string, string> = {
|
||||
green: "bg-green-500 glow-green",
|
||||
red: "bg-red-500 glow-red",
|
||||
amber: "bg-amber-500 glow-amber",
|
||||
blue: "bg-blue-500 glow-blue",
|
||||
purple: "bg-purple-500 glow-purple",
|
||||
};
|
||||
|
||||
interface StatusBadgeProps {
|
||||
color: "green" | "red" | "amber" | "blue" | "purple";
|
||||
label?: string;
|
||||
}
|
||||
|
||||
export function StatusBadge({ color, label }: StatusBadgeProps) {
|
||||
return (
|
||||
<span className="inline-flex items-center gap-1.5 text-xs">
|
||||
<span
|
||||
className={cn(
|
||||
"w-2 h-2 rounded-full shrink-0",
|
||||
colorMap[color] ?? "bg-gray-500"
|
||||
)}
|
||||
/>
|
||||
{label && <span className="text-muted-foreground">{label}</span>}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user