feat(overlay): fire the cancel handler when dismissing from backdrop

Renamed action sheet’s button.style to button.role, and added
button.role to alerts. Pass the button’s role in the dismiss method.
Related #5251
This commit is contained in:
Adam Bradley
2016-01-29 16:11:25 -06:00
parent b472c6cd43
commit 1c618b51eb
6 changed files with 93 additions and 53 deletions

View File

@ -83,8 +83,8 @@ export class ViewController {
this._onDismiss = callback;
}
dismiss(data) {
this._onDismiss && this._onDismiss(data);
dismiss(data, role?) {
this._onDismiss && this._onDismiss(data, role);
return this._nav.remove(this._nav.indexOf(this), 1, this._leavingOpts);
}