Function
Badge
({
className,
variant,
asChild = false,
...props
}: React.ComponentProps<"span"> &
VariantProps<typeof badgeVariants> & { asChild?: boolean })
Source from the content-addressed store, hash-verified
| 30 | ) |
| 31 | |
| 32 | function Badge({ |
| 33 | className, |
| 34 | variant, |
| 35 | asChild = false, |
| 36 | ...props |
| 37 | }: React.ComponentProps<"span"> & |
| 38 | VariantProps<typeof badgeVariants> & { asChild?: boolean }) { |
| 39 | const Comp = asChild ? Slot : "span" |
| 40 | |
| 41 | return ( |
| 42 | <Comp |
| 43 | data-slot="badge" |
| 44 | className={cn(badgeVariants({ variant }), className)} |
| 45 | {...props} |
| 46 | /> |
| 47 | ) |
| 48 | } |
| 49 | |
| 50 | export { Badge, badgeVariants } |
Callers
nothing calls this directly
Tested by
no test coverage detected