Deploy
This commit is contained in:
@@ -0,0 +1,30 @@
|
|||||||
|
import { cn } from "@/lib/utils"
|
||||||
|
|
||||||
|
interface BadgeProps {
|
||||||
|
variant?: "default" | "secondary" | "outline" | "accent"
|
||||||
|
className?: string
|
||||||
|
children: React.ReactNode
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function Badge({
|
||||||
|
variant = "default",
|
||||||
|
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 === "default",
|
||||||
|
"bg-secondary text-secondary-foreground": variant === "secondary",
|
||||||
|
"border border-border text-foreground": variant === "outline",
|
||||||
|
"bg-accent text-accent-foreground": variant === "accent"
|
||||||
|
},
|
||||||
|
className
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</span>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user