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

Function Button

src/components/ui/button.tsx:38–57  ·  view source on GitHub ↗
({
  className,
  variant,
  size,
  asChild = false,
  ...props
}: React.ComponentProps<"button"> &
  VariantProps<typeof buttonVariants> & {
    asChild?: boolean;
  })

Source from the content-addressed store, hash-verified

36);
37
38function Button({
39 className,
40 variant,
41 size,
42 asChild = false,
43 ...props
44}: React.ComponentProps<"button"> &
45 VariantProps<typeof buttonVariants> & {
46 asChild?: boolean;
47 }) {
48 const Comp = asChild ? Slot : "button";
49
50 return (
51 <Comp
52 data-slot="button"
53 className={cn(buttonVariants({ variant, size, className }))}
54 {...props}
55 />
56 );
57}
58
59export { Button, buttonVariants };

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected