Repository navigation
[EuiButtonIcon] Add isLoading prop - #5668
Conversation
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5668/ |
1 similar comment
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5668/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5668/ |
cee-chen
left a comment
There was a problem hiding this comment.
This looks great to me - I have one very minor Typescript suggestion, but that's it. I QA'd in the playground and it looked like it was working perfectly 👍
|
|
||
| // `original` size doesn't exist in `EuiLoadingSpinner` | ||
| // when the `iconSize` is `original` we don't pass any size to the `EuiLoadingSpinner` | ||
| // so it gets the default size |
There was a problem hiding this comment.
Super appreciate this comment for context!
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5668/ |
|
Thanks @constancecchen 🎉
I fixed it. 👍🏽 |
Summary
This PR adds an
isLoadingprop to EuiButtonIcon and closes #5649. It follows the other buttons' patterns, when theisLoadingistruethe button gets disabled, and the icon is replaced with a EuiLoadingSpinner.The EuiButtonIcon can have different icon sizes. So the icon size also dictates the size of the EuiLoadingSpinner. For this reason and to match all the EuiButtonIcon sizes a new size was introduced to the EuiLoadingSpinner:
"XXL".There is one exception. If consumers pass
"original"toiconSizethe EuiLoadingSpinner will get its default size"m".Checklist
[ ] Checked in mobile[ ] Added documentation[ ] Checked Code Sandbox works for any docs examples[ ] Checked for breaking changes and labeled appropriately[ ] Checked for accessibility including keyboard-only and screenreader modes