diff --git a/core/src/components/modal/modal.tsx b/core/src/components/modal/modal.tsx index a2b1e7a39e0..8aaf965b0bf 100644 --- a/core/src/components/modal/modal.tsx +++ b/core/src/components/modal/modal.tsx @@ -1,6 +1,7 @@ import { Component, ComponentInterface, Element, Event, EventEmitter, Host, Method, Prop, h } from '@stencil/core'; import { getIonMode } from '../../global/ionic-global'; +import { config } from '../../global/config'; import { Animation, AnimationBuilder, ComponentProps, ComponentRef, FrameworkDelegate, Gesture, OverlayEventDetail, OverlayInterface } from '../../interface'; import { attachComponent, detachComponent } from '../../utils/framework-delegate'; import { BACKDROP, activeAnimations, dismiss, eventMethod, prepareOverlay, present } from '../../utils/overlays'; @@ -150,7 +151,8 @@ export class Modal implements ComponentInterface, OverlayInterface { // All of the elements needed for the swipe gesture // should be in the DOM and referenced by now, except // for the presenting el - const ani = this.animation = iosLeaveAnimation(this.el, this.presentingElement); + const animationBuilder = (this.leaveAnimation) ? this.leaveAnimation : config.get('modalLeave', iosEnterAnimation); + const ani = this.animation = animationBuilder(this.el, this.presentingElement); this.gesture = createSwipeToCloseGesture( this.el, ani,