react-native-paper
react-native-paper copied to clipboard
feat: add loading prop to IconButton
Summary
Added a loading prop to the IconButton - related issue https://github.com/callstack/react-native-paper/issues/1112 - if the Button has a loading prop, makes sense the IconButton does as well.
Test plan
- Download this branch
- Create IconButton (or take a peak at the example)
- Pass in loading prop
- Presto
Hey @pynner, thank you for your pull request 🤗. The documentation from this branch can be viewed here.
Hello @pynner,
Thanks for your contribution.
Could you point us to the material guidelines if icon button loading follows the design principles? Personally, I've tried to find it, but could not get it.
Hey @wojteg1337
Best I could find was here, scroll to Integrating with actions
where it states that the loading indicator can be integrated into a button or actionable icon. I believe an actionable icon === IconButton.
In the official Material button docs I don't see a mention of a loading state nor a demonstration of it, only from the page I linked.
Unrelated to this PR, but it looks like the actual paper Button loading state does not follow the design spec of the page I linked. Instead of having the ActivityIndicator as an icon, it should be centred and replace the text.
Would love this feature.
Hello 👋, this pull request has been open for more than 2 months with no activity on it. If you think this is still necessary with the latest version, please comment and ping a maintainer to get this reviewed, otherwise it will be closed automatically in 7 days.
Any update on this @wojteg1337?
Would love this! Currently it's hard to have an activityIndicator without layout shifts