Skip to content

Commit

Permalink
Add sharedElementTransitions option to showModal and `dismissModa…
Browse files Browse the repository at this point in the history
…l` (#6699)

* Add `sharedElementTransitions` option to `showModal` and `dismissModal`
* Add elementTransitions to ModalAnimationOptions

Co-authored-by: yogevbd <yogev132@gmail.com>
Co-authored-by: Guy Carmeli <guyca@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 21, 2020
1 parent 055758d commit 33150d9
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions lib/src/interfaces/Options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 33150d9

Please sign in to comment.