MCPcopy Create free account
hub / github.com/R44VC0RP/opencode.cafe / Button

Function Button

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

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

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected