From 33150d99b567ad4acce497f4df5fa474b8bbbbd1 Mon Sep 17 00:00:00 2001 From: Marc Rousavy Date: Wed, 21 Oct 2020 13:56:41 +0200 Subject: [PATCH] Add `sharedElementTransitions` option to `showModal` and `dismissModal` (#6699) * Add `sharedElementTransitions` option to `showModal` and `dismissModal` * Add elementTransitions to ModalAnimationOptions Co-authored-by: yogevbd Co-authored-by: Guy Carmeli --- lib/src/interfaces/Options.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/src/interfaces/Options.ts b/lib/src/interfaces/Options.ts index fa34cb79339..a45f6c4d410 100644 --- a/lib/src/interfaces/Options.ts +++ b/lib/src/interfaces/Options.ts @@ -1094,6 +1094,17 @@ export interface ViewAnimationOptions extends ScreenAnimationOptions { id?: string; } +export interface ModalAnimationOptions extends ViewAnimationOptions { + /** + * Animations to be applied on elements which are shared between the appearing and disappearing screens + */ + sharedElementTransitions?: SharedElementTransition[]; + /** + * Animations to be applied on views in the appearing or disappearing screens + */ + elementTransitions?: ElementTransition[]; +} + /** * Used for describing stack commands animations. */ @@ -1152,11 +1163,11 @@ export interface AnimationOptions { /** * Configure what animates when modal is shown */ - showModal?: ViewAnimationOptions; + showModal?: ModalAnimationOptions; /** * Configure what animates when modal is dismissed */ - dismissModal?: ViewAnimationOptions; + dismissModal?: ModalAnimationOptions; } /**