Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

feat: update button component with loading spinner

Marc Seitzbfb3127b8da0
diff --git a/components/ui/button.tsx b/components/ui/button.tsx
index 2a429523..8c5ebaf0 100644
--- a/components/ui/button.tsx
+++ b/components/ui/button.tsx
@@ -50,7 +50,10 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
ref={ref}
disabled={disabled || loading}
{...props}
- />
+ >
+ {loading ? <LoadingSpinner className="mr-1 h-5 w-5" /> : null}
+ {props.children}
+ </Comp>
);
}
);