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