Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Commit

Permalink
fix: fix duplicate loader for iconright, #noissue (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
SarahHouben authored May 5, 2022
1 parent 3eb0048 commit 9f68035
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/Button/README.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ Basic button types and sizes:
<Button iconRight icon="arrow-right" isActive size="medium">
Let's go
</Button>
<Button iconRight="arrow-right" isActive size="medium">
Let's go again
</Button>
</InlineList>
</Canvas>

Expand Down Expand Up @@ -101,6 +104,9 @@ Disabled:
<Button isDisabled iconRight icon="arrow-right" isActive size="medium">
Let's go
</Button>
<Button isDisabled iconRight="arrow-right" isActive size="medium">
Let's go again
</Button>
</InlineList>
</Canvas>

Expand Down Expand Up @@ -129,6 +135,9 @@ Loading:
<Button isLoading iconRight icon="arrow-right" isActive size="medium">
Let's go
</Button>
<Button isLoading iconRight="arrow-right" isActive size="medium">
Let's go again
</Button>
</InlineList>
</Canvas>

Expand Down
4 changes: 3 additions & 1 deletion src/Button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,9 @@ const Button = forwardRef((props, ref) => {
{isLoading && (
<VisuallyHidden>{loadingLabel}</VisuallyHidden>
)}
{!icon && isLoading && <SpinnerDot />}
{!icon && !hasSeparateRightIcon && isLoading && (
<SpinnerDot />
)}
</>
))}

Expand Down

0 comments on commit 9f68035

Please sign in to comment.