26 lines
848 B
TypeScript
26 lines
848 B
TypeScript
import { cn } from "@/lib/utils";
|
|
import type { CustomerStatus } from "@/types/customer";
|
|
|
|
const labels: Record<CustomerStatus, string> = {
|
|
lead: "Lead",
|
|
active: "Aktiv",
|
|
inactive: "Inaktiv",
|
|
blocked: "Gesperrt",
|
|
archived: "Archiviert",
|
|
};
|
|
|
|
const styles: Record<CustomerStatus, string> = {
|
|
lead: "bg-sky-50 text-sky-700 ring-sky-600/20",
|
|
active: "bg-emerald-50 text-emerald-700 ring-emerald-600/20",
|
|
inactive: "bg-slate-100 text-slate-600 ring-slate-500/20",
|
|
blocked: "bg-red-50 text-red-700 ring-red-600/20",
|
|
archived: "bg-zinc-100 text-zinc-600 ring-zinc-500/20",
|
|
};
|
|
|
|
export default function CustomerStatusBadge({ status }: { status: CustomerStatus }) {
|
|
return (
|
|
<span className={cn("inline-flex h-6 items-center rounded-full px-2 text-xs font-medium ring-1", styles[status])}>
|
|
{labels[status]}
|
|
</span>
|
|
);
|
|
}
|