MCPcopy
hub / github.com/megh-bari/pattern-craft / Badge

Function Badge

src/components/ui/badge.tsx:28–44  ·  view source on GitHub ↗
({
  className,
  variant,
  asChild = false,
  ...props
}: React.ComponentProps<"span"> &
  VariantProps<typeof badgeVariants> & { asChild?: boolean })

Source from the content-addressed store, hash-verified

26);
27
28function 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
46export { Badge, badgeVariants };

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected