Deploy
This commit is contained in:
@@ -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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user