MCPcopy Create free account
hub / github.com/agent-tower/core / Button

Function Button

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

Source from the content-addressed store, hash-verified

39 asChild = false,
40 ...props
41}: React.ComponentProps<"button"> & {
42 variant?: ButtonVariant | null
43 size?: ButtonSize | null
44 asChild?: boolean
45}) {
46 const Comp = asChild ? Slot.Root : "button"
47 const resolvedVariant = variant ?? "default"
48 const resolvedSize = size ?? "default"
49
50 return (
51 <Comp
52 data-slot="button"
53 data-variant={resolvedVariant}
54 data-size={resolvedSize}
55 className={buttonClassName({ ...VARIANT[resolvedVariant], ...SIZE[resolvedSize], className })}
56 {...props}
57 />
58 )
59}
60
61export { Button }

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected