This commit is contained in:
Vula Builder
2026-08-05 18:14:39 +00:00
parent 73d83ec038
commit 279d3a17f7
+24
View File
@@ -0,0 +1,24 @@
import { cn } from '@/lib/utils'
import type { HTMLAttributes } from 'react'
interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
variant?: "default" | "secondary" | "outline" | "accent"
}
export default function Badge({ variant = 'default', className, ...props }: 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 === "default",
"bg-secondary text-secondary-foreground": variant === "secondary",
"bg-accent text-accent-foreground": variant === "accent",
"border border-border bg-transparent text-foreground": variant === "outline"
},
className
)}
{...props}
/>
)
}