From e0b0d7ac30e858a96b191b127e95b938f0edaf17 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Wed, 30 Dec 2015 21:53:38 -0600 Subject: [PATCH] feat(overlays): click delays for md ripple --- ionic/components/action-sheet/action-sheet.ts | 5 ++++- ionic/components/alert/alert.md.scss | 1 + ionic/components/alert/alert.ts | 7 +++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ionic/components/action-sheet/action-sheet.ts b/ionic/components/action-sheet/action-sheet.ts index f6605babf8..e680feaa1c 100644 --- a/ionic/components/action-sheet/action-sheet.ts +++ b/ionic/components/action-sheet/action-sheet.ts @@ -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')); } } diff --git a/ionic/components/alert/alert.md.scss b/ionic/components/alert/alert.md.scss index f664896020..f562ba4b04 100644 --- a/ionic/components/alert/alert.md.scss +++ b/ionic/components/alert/alert.md.scss @@ -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; diff --git a/ionic/components/alert/alert.ts b/ionic/components/alert/alert.ts index c87a3f69fa..2c72548249 100644 --- a/ionic/components/alert/alert.ts +++ b/ionic/components/alert/alert.ts @@ -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')); } }