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