Deploy
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
||||
variant?: "default" | "secondary" | "outline" | "accent"
|
||||
}
|
||||
|
||||
export default function Badge({
|
||||
className,
|
||||
variant = "default",
|
||||
...props
|
||||
}: BadgeProps) {
|
||||
return (
|
||||
<span
|
||||
className={cn(
|
||||
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium",
|
||||
{
|
||||
"border-transparent bg-primary text-primary-foreground": variant === "default",
|
||||
"border-transparent bg-secondary text-secondary-foreground": variant === "secondary",
|
||||
"border-border bg-background text-foreground": variant === "outline",
|
||||
"border-transparent bg-accent text-accent-foreground": variant === "accent"
|
||||
},
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user