13 lines
423 B
TypeScript
13 lines
423 B
TypeScript
import type { HTMLAttributes } from "react";
|
|
import { cn } from "@/lib/utils";
|
|
|
|
export type BadgeVariant = "default" | "secondary" | "outline" | "destructive";
|
|
|
|
export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
variant?: BadgeVariant;
|
|
}
|
|
|
|
export function Badge({ className, variant = "default", ...props }: BadgeProps) {
|
|
return <span data-variant={variant} className={cn(className)} {...props} />;
|
|
}
|