Files
vula-d6e6a2f2/src/components/ui/Badge.tsx
T
Vula Builder 3deaff9454 Deploy
2026-07-26 17:41:21 +00:00

26 lines
799 B
TypeScript

import { cn } from "@/lib/utils"
interface BadgeProps {
variant?: "primary" | "secondary" | "outline" | "accent"
className?: string
children: React.ReactNode
}
export default function Badge({ variant = "primary", className, children }: BadgeProps) {
return (
<span
className={cn(
"inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors",
{
"bg-primary text-primary-foreground": variant === "primary",
"bg-secondary text-secondary-foreground": variant === "secondary",
"border border-border text-muted-foreground bg-background": variant === "outline",
"bg-accent text-accent-foreground": variant === "accent"
},
className
)}
>
{children}
</span>
)
}