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