Function
Button
({
ref,
className,
variant,
size,
asChild = false,
...props
}: ButtonProps & {
ref?: React.RefObject<HTMLButtonElement>;
})
Source from the content-addressed store, hash-verified
| 42 | } |
| 43 | |
| 44 | const 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 | }; |
| 63 | Button.displayName = 'Button'; |
| 64 | |
| 65 | export { Button, buttonVariants }; |
Callers
nothing calls this directly
Tested by
no test coverage detected