MCPcopy Create free account
hub / github.com/code100x/mobile-magic / Button

Function Button

react-base-app/src/components/ui/button.tsx:37–56  ·  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

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

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected