okami.mom/web-extract-go
git clone https://git.nkp.pet/okami.mom/web-extract-go
5a90548
main
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-md 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{ 9variants :{ 10variant :{ 11default : 12"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80" , 13secondary : 14"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80" , 15destructive : 16"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80" , 17outline :"text-foreground" , 18}, 19}, 20defaultVariants :{ 21variant :"default" , 22}, 23} 24) 25 26export interface BadgeProps 27extends React . HTMLAttributes < HTMLDivElement >, 28VariantProps < typeof badgeVariants > {} 29 30function Badge ({ className, variant, ...props } :BadgeProps ) { 31return ( 32< div className = { cn ( badgeVariants ({ variant}), className )} { ...props } /> 33) 34} 35 36export { Badge , badgeVariants }