Add initial Portal version
This commit is contained in:
29
src/components/ui/status-badge.tsx
Normal file
29
src/components/ui/status-badge.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
const phaseStyles: Record<string, string> = {
|
||||
Running:
|
||||
"bg-success/10 text-success border-success/20",
|
||||
Provisioning:
|
||||
"bg-warning/10 text-warning border-warning/20",
|
||||
Pending:
|
||||
"bg-text-muted/10 text-text-secondary border-border",
|
||||
Error:
|
||||
"bg-error/10 text-error border-error/20",
|
||||
Deleting:
|
||||
"bg-text-muted/10 text-text-muted border-border",
|
||||
};
|
||||
|
||||
export function StatusBadge({ phase }: { phase: string }) {
|
||||
const style = phaseStyles[phase] ?? phaseStyles.Pending;
|
||||
return (
|
||||
<span
|
||||
className={`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-xs font-medium ${style}`}
|
||||
>
|
||||
{phase === "Running" && (
|
||||
<span className="status-pulse h-1.5 w-1.5 rounded-full bg-success" />
|
||||
)}
|
||||
{phase === "Provisioning" && (
|
||||
<span className="status-pulse h-1.5 w-1.5 rounded-full bg-warning" />
|
||||
)}
|
||||
{phase}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user