Skip to content

Commit

Permalink
fix(Button): do not render main spinner if there is a count when load…
Browse files Browse the repository at this point in the history
…ing (#5605)

* fix(Button): do not render main spinner if there is a count when loading

* Create itchy-numbers-fetch.md

---------

Co-authored-by: Jon Rohan <[email protected]>
  • Loading branch information
francinelucca and jonrohan authored Jan 29, 2025
1 parent 2db6c92 commit d14c48c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/itchy-numbers-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

fix(Button): do not render main spinner if there is a count when loading
2 changes: 2 additions & 0 deletions packages/react/src/Button/ButtonBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ const ButtonBase = forwardRef(
!LeadingVisual &&
!TrailingVisual &&
!TrailingAction &&
count === undefined &&
renderModuleVisual(Spinner, loading, 'loadingSpinner', false)
}
{
Expand Down Expand Up @@ -258,6 +259,7 @@ const ButtonBase = forwardRef(
!LeadingVisual &&
!TrailingVisual &&
!TrailingAction &&
count === undefined &&
renderModuleVisual(Spinner, loading, 'loadingSpinner', false)
}
{
Expand Down

0 comments on commit d14c48c

Please sign in to comment.