Function
Button
({
className,
variant,
size,
asChild = false,
...props
}: React.ComponentProps<'button'> &
VariantProps<typeof buttonVariants> & {
asChild?: boolean
})
Source from the content-addressed store, hash-verified
| 48 | ) |
| 49 | |
| 50 | function Button({ |
| 51 | className, |
| 52 | variant, |
| 53 | size, |
| 54 | asChild = false, |
| 55 | ...props |
| 56 | }: React.ComponentProps<'button'> & |
| 57 | VariantProps<typeof buttonVariants> & { |
| 58 | asChild?: boolean |
| 59 | }) { |
| 60 | const Comp = asChild ? Slot : 'button' |
| 61 | |
| 62 | return ( |
| 63 | <Comp |
| 64 | data-slot="button" |
| 65 | className={cn(buttonVariants({ variant, size, className }))} |
| 66 | {...props} |
| 67 | /> |
| 68 | ) |
| 69 | } |
| 70 | |
| 71 | export { Button, buttonVariants } |
Callers
nothing calls this directly
Tested by
no test coverage detected