-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
onOk and onCancel #39
Comments
Hi @midenarif, This is something that has been requested in the past and it wasn't really recommended in the Material Design guidelines. The guidelines now cover this so if you wanna come up with an implementation that matches the specification I'd happily accept a PR for it 🙂 |
There are cases where only a single button is needed. For example, my app pops up a dialog to notify the user if the internet connection has dropped. The only button needed is an acknowledgement. Indeed, Google's Material Design guidelines state the same thing about acknowledgement actions.
https://material.io/design/components/dialogs.html#actions I think it's important to note Google's choice of name: Material Design guidelines, and not laws. Guidelines are a starting point and cover general cases, but not every single case. Thus it would be better to treat the guidelines less rigidly. There are obvious use cases for a single button dialog regardless of what Google explicitly states. There may even be oddball cases where 3 buttons are needed (I would discourage that, but could see it needed in rare cases). |
I opened a Pull Request #59 for this, is quite simple, please review it! @hectahertz |
There are cases where no button is also acceptable.
This is the exact sequence that happens in a Picker/Dropdown. |
Please provide onOk and onCancel as optional and developer will select any one of them. Because sometimes we need an option to close dialog when user clicks only OK button
The text was updated successfully, but these errors were encountered: