We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 883c508 commit 0d59efbCopy full SHA for 0d59efb
1 file changed
frontend/components/ui/button.tsx
@@ -35,16 +35,18 @@ const buttonVariants = cva(
35
}
36
)
37
38
+type ButtonProps = React.ComponentProps<"button"> &
39
+ VariantProps<typeof buttonVariants> & {
40
+ asChild?: boolean
41
+ };
42
+
43
function Button({
44
className,
45
variant,
46
size,
47
asChild = false,
48
...props
-}: React.ComponentProps<"button"> &
- VariantProps<typeof buttonVariants> & {
- asChild?: boolean
- }) {
49
+}: ButtonProps) {
50
const Comp = asChild ? Slot : "button"
51
52
return (
@@ -57,3 +59,4 @@ function Button({
57
59
58
60
61
export { Button, buttonVariants }
62
+export type { ButtonProps }
0 commit comments