Skip to content

Commit 5de31fb

Browse files
committed
test(modal): fix custom modal transition
1 parent 79a94db commit 5de31fb

File tree

1 file changed

+7
-5
lines changed
  • ionic/components/modal/test/basic

1 file changed

+7
-5
lines changed

ionic/components/modal/test/basic/index.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {App, Page, Config, Platform} from 'ionic/ionic';
2-
import {Modal, ActionSheet, NavController, NavParams, Transition, ViewController} from 'ionic/ionic';
2+
import {Modal, ActionSheet, NavController, NavParams, Transition, TransitionOptions, ViewController} from 'ionic/ionic';
33

44

55
@Page({
@@ -285,9 +285,10 @@ class E2EApp {
285285

286286

287287
class FadeIn extends Transition {
288-
constructor(enteringView: ViewController, leavingView: ViewController) {
289-
super(enteringView.pageRef());
288+
constructor(enteringView: ViewController, leavingView: ViewController, opts: TransitionOptions) {
289+
super(opts);
290290
this
291+
.element(enteringView.pageRef())
291292
.easing('ease')
292293
.duration(1000)
293294
.fromTo('translateY', '0%', '0%')
@@ -298,9 +299,10 @@ class FadeIn extends Transition {
298299
Transition.register('my-fade-in', FadeIn);
299300

300301
class FadeOut extends Transition {
301-
constructor(enteringView: ViewController, leavingView: ViewController) {
302-
super(leavingView.pageRef());
302+
constructor(enteringView: ViewController, leavingView: ViewController, opts: TransitionOptions) {
303+
super(opts);
303304
this
305+
.element(leavingView.pageRef())
304306
.easing('ease')
305307
.duration(500)
306308
.fadeOut()

0 commit comments

Comments
 (0)