Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot] 2026-04-17 19:00:15 +00:00
parent b694546dbd
commit 33694bf8f4

View file

@ -1,6 +1,6 @@
"use client"; "use client";
import { Badge } from "@/components/ui/badge"; import { Badge, type BadgeProps } from "@/components/ui/badge";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
const STATUS_LABELS: Record<string, string> = { const STATUS_LABELS: Record<string, string> = {
@ -11,21 +11,21 @@ const STATUS_LABELS: Record<string, string> = {
archived: "Arquivada", archived: "Arquivada",
}; };
const STATUS_CLASSES: Record<string, string> = { const STATUS_VARIANTS: Record<string, BadgeProps["variant"]> = {
draft: "bg-amber-500/15 text-amber-600 dark:text-amber-400 border-amber-500/30", draft: "warning",
testing: "bg-blue-500/15 text-blue-600 dark:text-blue-400 border-blue-500/30", testing: "info",
active: "bg-emerald-500/15 text-emerald-600 dark:text-emerald-400 border-emerald-500/30", active: "success",
disabled: "bg-slate-500/15 text-slate-600 dark:text-slate-400 border-slate-500/30", disabled: "muted",
archived: "bg-slate-500/10 text-slate-500/70 border-slate-500/20", archived: "muted",
}; };
export function SkillStatusBadge({ status, className }: { status: string; className?: string }) { export function SkillStatusBadge({ status, className }: { status: string; className?: string }) {
return ( return (
<Badge <Badge
variant="outline" variant={STATUS_VARIANTS[status] ?? "warning"}
className={cn( className={cn(
"rounded-md font-medium", "rounded-md font-medium",
STATUS_CLASSES[status] ?? STATUS_CLASSES.draft, status === "archived" && "opacity-70",
className, className,
)} )}
> >