Skip to content

batches: migrate instances of button with loading state to `LoaderButton`

Administrator requested to merge kr/loader-button into main

Created by: courier-new

I noticed that when we were using a Button that has a LoadingSpinner appear when the action is occurring, we inconsistently included space between the spinner and the label text. There was also nothing dictating the spinner had to appear to the left of the label text. Fortunately, there's an app component for that.

This just migrates our uses of buttons with spinners to the dedicated component, LoaderButton.

Test plan

The underlying component is still a Button that has all of its props passed, so the only thing that should be changing is how the loading spinner is rendered. I have manually reviewed several cases of the button to verify this.

App preview:

Check out the client app preview documentation to learn more.

Merge request reports

Loading