MCPcopy Create free account
hub / github.com/AntiHub-Project/AntiHub / Button

Function Button

components/ui/button.tsx:39–58  ·  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

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

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected