From e245b4fa229bee1e2ab97fcb42de3831b8bdbe5b Mon Sep 17 00:00:00 2001
From: Vijay A <vraravam@users.noreply.github.com>
Date: Wed, 24 May 2023 06:57:50 +0530
Subject: Upgrade npm modules

---
 src/components/ui/button/index.tsx | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

(limited to 'src/components/ui/button/index.tsx')

diff --git a/src/components/ui/button/index.tsx b/src/components/ui/button/index.tsx
index dc984bf95..9444efde2 100644
--- a/src/components/ui/button/index.tsx
+++ b/src/components/ui/button/index.tsx
@@ -117,12 +117,12 @@ const styles = (theme: Theme) => ({
     zIndex: 9999,
   },
   loaderContainer: {
-    width: (props: IProps): string => (!props.busy ? '0' : '40px'),
+    width: (props: IProps): string => (props.busy ? '40px' : '0'),
     height: 20,
     overflow: 'hidden',
     transition: loaderContainerTransition,
-    marginLeft: (props: IProps): number => (!props.busy ? 10 : 20),
-    marginRight: (props: IProps): number => (!props.busy ? -10 : -20),
+    marginLeft: (props: IProps): number => (props.busy ? 20 : 10),
+    marginRight: (props: IProps): number => (props.busy ? -20 : -10),
     position: (): Property.Position => 'inherit',
   },
   icon: {
@@ -217,38 +217,38 @@ class ButtonComponent extends Component<IProps, IState> {
       </>
     );
 
-    const wrapperComponent = !href ? (
-      <button
-        id={id}
-        type={type}
+    const wrapperComponent = href ? (
+      <a
+        href={href}
+        target={target}
         onClick={onClick}
         className={classnames({
           [`${classes.button}`]: true,
           [`${classes[buttonType as ButtonType]}`]: true,
-          [`${classes.disabled}`]: disabled,
           [`${className}`]: className,
         })}
-        disabled={disabled}
+        rel={target === '_blank' ? 'noopener' : ''}
         data-type="franz-button"
-        {...(htmlForm && { form: htmlForm })}
       >
         {content}
-      </button>
+      </a>
     ) : (
-      <a
-        href={href}
-        target={target}
+      <button
+        id={id}
+        type={type}
         onClick={onClick}
         className={classnames({
           [`${classes.button}`]: true,
           [`${classes[buttonType as ButtonType]}`]: true,
+          [`${classes.disabled}`]: disabled,
           [`${className}`]: className,
         })}
-        rel={target === '_blank' ? 'noopener' : ''}
+        disabled={disabled}
         data-type="franz-button"
+        {...(htmlForm && { form: htmlForm })}
       >
         {content}
-      </a>
+      </button>
     );
 
     return wrapperComponent;
-- 
cgit v1.2.3-70-g09d2

