A quick vibe-coded site to test response times of PLC.directory mirrors (over 3 attempts)
at main 1.1 kB view raw
1import * as React from "react"; 2import { cva, type VariantProps } from "class-variance-authority"; 3 4import { cn } from "@/lib/utils"; 5 6const badgeVariants = cva( 7 "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-ring focus:ring-offset-2", 8 { 9 variants: { 10 variant: { 11 default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80", 12 secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80", 13 destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80", 14 outline: "text-foreground", 15 }, 16 }, 17 defaultVariants: { 18 variant: "default", 19 }, 20 }, 21); 22 23export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {} 24 25function Badge({ className, variant, ...props }: BadgeProps) { 26 return <div className={cn(badgeVariants({ variant }), className)} {...props} />; 27} 28 29export { Badge, badgeVariants };