Slide 19
Slide 19 text
shadcn/ui
export interface
extends
typeof
?:
const =
= ... =>
const = ? :
return
<
=
=
...
/>
. < >,
< buttonVariants> {
}
React. < , >(
({ , , , , }, ) {
asChild Slot
(
className { ( ({ , , }))}
ref {ref}
{ }
)
ButtonProps
React ButtonHTMLAttributes HTMLButtonElement
VariantProps
forwardRef HTMLButtonElement ButtonProps
cn
asChild
className variant size asChild props ref
Comp
buttonVariants variant size className
props
boolean
Button
false
Comp "button"