Skip to content

Commit f23b223

Browse files
committed
Updated types related to options.animations to match the native code.
1 parent 4517d22 commit f23b223

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

lib/src/commands/OptionsProcessor.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ describe('navigation options', () => {
3333
blurOnUnmount: false,
3434
popGesture: false,
3535
modalPresentationStyle: OptionsModalPresentationStyle.fullScreen,
36-
animations: { dismissModal: { alpha: { from: 0, to: 1 } } },
36+
animations: { dismissModal: { content: { alpha: { from: 0, to: 1 } } } },
3737
};
3838
uut.processOptions(options);
3939
expect(options).toEqual({
4040
blurOnUnmount: false,
4141
popGesture: false,
4242
modalPresentationStyle: OptionsModalPresentationStyle.fullScreen,
43-
animations: { dismissModal: { alpha: { from: 0, to: 1 } } },
43+
animations: { dismissModal: { content: { alpha: { from: 0, to: 1 } } } },
4444
});
4545
});
4646

lib/src/interfaces/Options.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ export interface AnimationOptions {
780780
/**
781781
* Configure the setRoot animation
782782
*/
783-
setRoot?: ScreenAnimationOptions;
783+
setRoot?: StackAnimationOptions;
784784
/**
785785
* Configure what animates when a screen is pushed
786786
*/
@@ -792,11 +792,15 @@ export interface AnimationOptions {
792792
/**
793793
* Configure what animates when modal is shown
794794
*/
795-
showModal?: ScreenAnimationOptions;
795+
showModal?: StackAnimationOptions;
796796
/**
797797
* Configure what animates when modal is dismissed
798798
*/
799-
dismissModal?: ScreenAnimationOptions;
799+
dismissModal?: StackAnimationOptions;
800+
/**
801+
* Configure what animates when stack root is changed
802+
*/
803+
setStackRoot?: StackAnimationOptions;
800804
}
801805

802806
export interface OptionsCustomTransition {

0 commit comments

Comments
 (0)