Dialog
The Dialog API can be used to ask simple questions much like the JavaScript confirm()
method.
You can launch a Dialog with methods to handle OK and Cancel.
You are encouraged to specify the text of the OK button. The button should attempt to indicate what happens when you press it.
You can add a third string argument to specify the Cancel text.
Buttons setup
Dialog buttons are secondary (blue) by default, but you can choose to make the accept
or cancel
button primary. You can also tweak the default focus.
You can change the label of both the primary and secondary buttons.
Warning dialogs
You can launch special dialogs to confirm choices of more dire consequence.
Dialog icons
You can point the icon
property to an alternative icon class, but you should stick to the stock icons whenever possible so that the user can easily recognize the dialog type.