This commit is contained in:
Vula Builder
2026-07-14 19:12:50 +00:00
parent b0379bb2f6
commit fc92f6d58f
+28
View File
@@ -0,0 +1,28 @@
import { cn } from '@/lib/utils'
interface BadgeProps {
variant?: "primary" | "secondary" | "accent" | "outline"
className?: string
children: React.ReactNode
}
const variantStyles: Record<string, string> = {
primary: 'bg-primary text-primary-foreground',
secondary: 'bg-secondary text-secondary-foreground',
accent: 'bg-accent text-accent-foreground',
outline: 'border border-border text-foreground',
}
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',
variantStyles[variant],
className
)}
>
{children}
</span>
)
}