[LoadingButton] Add ability to control size of circular progress
Open
Nobody has claimed this yet.
component: LoadingButton
scope: button
type: new feature
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
Duplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Summary 💡
Hello all,
I think LoadingButton could have the componentProps property, and let us pass props for the circularProgress that is being rendered. I think it will improve our experience!
Let me know what you think :)
Examples 🌈
I had written something like this
size="large"
onClick={() => createDraftTicket()}
loading={isCreatingDraftTicket}
sx={{ mt: 4 }}
loadingIndicator={<CircularProgress color="inherit" size={24} />} // I wrote this to enlarge the loading indicator.
>
<Typography variant="h5">
Text
<br>
Even More Text
</Typography>
</LoadingButton>```
Would feel neat if we had something like this:
```<LoadingButton
....
componentProps={{circularProgress: { size: 24 }}}
>
....
</LoadingButton>```
### Motivation 🔦
The motivation would be to try and avoid passing custom components/elements to solve props issues :)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the LoadingButton entry point and its existing loadingIndicator behavior, then compare the CircularProgress props used by the loading indicator. The issue does not name files or tests; done means users can control the circular progress size through LoadingButton without supplying a custom loading element.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100