Function
Button
({
className,
variant,
size,
asChild = false,
...props
}: React.ComponentProps<"button"> &
VariantProps<typeof buttonVariants> & {
asChild?: boolean;
})
Source from the content-addressed store, hash-verified
| 36 | ); |
| 37 | |
| 38 | function Button({ |
| 39 | className, |
| 40 | variant, |
| 41 | size, |
| 42 | asChild = false, |
| 43 | ...props |
| 44 | }: React.ComponentProps<"button"> & |
| 45 | VariantProps<typeof buttonVariants> & { |
| 46 | asChild?: boolean; |
| 47 | }) { |
| 48 | const Comp = asChild ? Slot : "button"; |
| 49 | |
| 50 | return ( |
| 51 | <Comp |
| 52 | data-slot="button" |
| 53 | className={cn(buttonVariants({ variant, size, className }))} |
| 54 | {...props} |
| 55 | /> |
| 56 | ); |
| 57 | } |
| 58 | |
| 59 | export { Button, buttonVariants }; |
Callers
nothing calls this directly
Tested by
no test coverage detected