MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / Button

Function Button

apps/public/src/components/ui/button.tsx:44–62  ·  view source on GitHub ↗
({
  ref,
  className,
  variant,
  size,
  asChild = false,
  ...props
}: ButtonProps & {
  ref?: React.RefObject<HTMLButtonElement>;
})

Source from the content-addressed store, hash-verified

42}
43
44const Button = ({
45 ref,
46 className,
47 variant,
48 size,
49 asChild = false,
50 ...props
51}: ButtonProps & {
52 ref?: React.RefObject<HTMLButtonElement>;
53}) => {
54 const Comp = asChild ? Slot : 'button';
55 return (
56 <Comp
57 className={cn(buttonVariants({ variant, size, className }))}
58 ref={ref}
59 {...props}
60 />
61 );
62};
63Button.displayName = 'Button';
64
65export { Button, buttonVariants };

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected