We have a couple of places where we manually stick a CircularProgress in a Button when we're waiting for an HTTP request to finish. material-ui v5 has a LoadingButton component, which takes a pending prop for this purpose. It looks a bit better and it can also keep showing the button text while the operation is in progress.
For after https://github.com/u-wave/web/pull/1287
We have a couple of places where we manually stick a CircularProgress in a Button when we're waiting for an HTTP request to finish. material-ui v5 has a LoadingButton component, which takes a
pending
prop for this purpose. It looks a bit better and it can also keep showing the button text while the operation is in progress.These are the ones I found:
https://github.com/u-wave/web/blob/1f15e25d8258068e64b041c95fd8918af7ed7718/src/components/Dialogs/ConfirmDialog/index.js#L87-L89
https://github.com/u-wave/web/blob/1f15e25d8258068e64b041c95fd8918af7ed7718/src/components/Dialogs/LoginDialog/LoginForm.js#L98-L107
https://github.com/u-wave/web/blob/1f15e25d8258068e64b041c95fd8918af7ed7718/src/components/Dialogs/LoginDialog/SocialForm.js#L142-L149
https://github.com/u-wave/web/blob/1f15e25d8258068e64b041c95fd8918af7ed7718/src/components/Dialogs/PromptDialog/index.js#L129-L131
https://github.com/u-wave/web/blob/1f15e25d8258068e64b041c95fd8918af7ed7718/src/components/Dialogs/LoginDialog/RegisterForm.js#L171-L178