From 9f680359fd8deeb7f38ed1b0db8709ab6720240a Mon Sep 17 00:00:00 2001
From: SarahHouben <41924354+SarahHouben@users.noreply.github.com>
Date: Thu, 5 May 2022 11:56:27 +0100
Subject: [PATCH] fix: fix duplicate loader for iconright, #noissue (#201)
---
src/Button/README.stories.mdx | 9 +++++++++
src/Button/index.js | 4 +++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/Button/README.stories.mdx b/src/Button/README.stories.mdx
index 635ef19a..dd38212f 100644
--- a/src/Button/README.stories.mdx
+++ b/src/Button/README.stories.mdx
@@ -73,6 +73,9 @@ Basic button types and sizes:
+
@@ -101,6 +104,9 @@ Disabled:
+
@@ -129,6 +135,9 @@ Loading:
+
diff --git a/src/Button/index.js b/src/Button/index.js
index a4e31983..3ae381c8 100644
--- a/src/Button/index.js
+++ b/src/Button/index.js
@@ -347,7 +347,9 @@ const Button = forwardRef((props, ref) => {
{isLoading && (
{loadingLabel}
)}
- {!icon && isLoading && }
+ {!icon && !hasSeparateRightIcon && isLoading && (
+
+ )}
>
))}