Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Update Button.tsx

Jonathan Summers-Muir5418c75e6ed9
diff --git a/packages/ui/src/components/Button/Button.tsx b/packages/ui/src/components/Button/Button.tsx
index 97363623f97..b553b769c86 100644
--- a/packages/ui/src/components/Button/Button.tsx
+++ b/packages/ui/src/components/Button/Button.tsx
@@ -161,6 +161,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
icon,
iconRight,
iconLeft,
+ htmlType = 'button',
...props
},
ref
@@ -176,7 +177,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
return (
<Comp
ref={ref}
- type={props.htmlType}
+ type={htmlType}
{...props}
className={cn(buttonVariants({ type, size, disabled, block }), className)}
>