feat(overlays): click delays for md ripple

This commit is contained in:
Adam Bradley
2015-12-30 21:53:38 -06:00
parent 3b66b0f96d
commit e0b0d7ac30
3 changed files with 10 additions and 3 deletions

View File

@ -87,6 +87,7 @@ class ActionSheetCmp {
constructor(
private _viewCtrl: ViewController,
private _config: Config,
params: NavParams, renderer: Renderer
) {
this.d = params.data;
@ -108,7 +109,9 @@ class ActionSheetCmp {
}
if (shouldDismiss) {
this.dismiss();
setTimeout(() => {
this.dismiss();
}, this._config.get('pageTransitionDelay'));
}
}

View File

@ -75,6 +75,7 @@ $alert-md-buttons-justify-content: flex-end !default;
.alert-button {
position: relative;
overflow: hidden;
padding: 10px;
font-weight: 500;
color: $alert-md-button-text-color;
background-color: $alert-md-button-background-color;

View File

@ -3,8 +3,8 @@ import {NgClass, NgIf, NgFor, FORM_DIRECTIVES} from 'angular2/common';
import {NavParams} from '../nav/nav-controller';
import {ViewController} from '../nav/view-controller';
import {Config} from '../../config/config';
import {Animation} from '../../animations/animation';
import {Button} from '../button/button';
import {isDefined} from '../../util/util';
@ -81,6 +81,7 @@ class AlertCmp {
constructor(
private _viewCtrl: ViewController,
private _elementRef: ElementRef,
private _config: Config,
params: NavParams,
renderer: Renderer
) {
@ -103,7 +104,9 @@ class AlertCmp {
}
if (shouldDismiss) {
this.dismiss();
setTimeout(() => {
this.dismiss();
}, this._config.get('pageTransitionDelay'));
}
}