restore: old src/ components, subscriptions, audit-log, client detail pages; fix tsconfig @/* paths; merge api.ts
This commit is contained in:
31
src/components/ui/Badge.tsx
Normal file
31
src/components/ui/Badge.tsx
Normal file
@@ -0,0 +1,31 @@
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
interface BadgeProps {
|
||||
children: React.ReactNode;
|
||||
variant?: "default" | "success" | "warning" | "danger" | "info" | "muted" | "purple";
|
||||
className?: string;
|
||||
}
|
||||
|
||||
const variantClasses: Record<string, string> = {
|
||||
default: "bg-blue-100 text-blue-800",
|
||||
success: "bg-green-100 text-green-800",
|
||||
warning: "bg-amber-100 text-amber-800",
|
||||
danger: "bg-red-100 text-red-800",
|
||||
info: "bg-sky-100 text-sky-800",
|
||||
muted: "bg-gray-100 text-gray-700",
|
||||
purple: "bg-purple-100 text-purple-800",
|
||||
};
|
||||
|
||||
export function Badge({ children, variant = "default", className }: BadgeProps) {
|
||||
return (
|
||||
<span
|
||||
className={cn(
|
||||
"inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium",
|
||||
variantClasses[variant],
|
||||
className
|
||||
)}
|
||||
>
|
||||
{children}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user