This commit is contained in:
Vula Builder
2026-07-27 18:06:17 +00:00
parent e32f05d09b
commit d5f384e69d
+27
View File
@@ -0,0 +1,27 @@
import { cn } from "@/lib/utils"
type BadgeVariant = "primary" | "secondary" | "outline"
interface BadgeProps {
variant?: BadgeVariant
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-foreground": variant === "outline"
},
className
)}
>
{children}
</span>
)
}