File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1456,6 +1456,8 @@ const CONST = {
14561456 ANIMATION_TIMING : {
14571457 DEFAULT_IN : 300 ,
14581458 DEFAULT_OUT : 200 ,
1459+ DEFAULT_RIGHT_DOCKED_IOS_IN : 500 ,
1460+ DEFAULT_RIGHT_DOCKED_IOS_OUT : 400 ,
14591461 FAB_IN : 350 ,
14601462 FAB_OUT : 200 ,
14611463 } ,
Original file line number Diff line number Diff line change 11import React from 'react' ;
2+ import useResponsiveLayout from '@hooks/useResponsiveLayout' ;
3+ import CONST from '@src/CONST' ;
24import BaseModal from './BaseModal' ;
35import type BaseModalProps from './types' ;
46
57function Modal ( { children, ...rest } : BaseModalProps ) {
8+ const { isInNarrowPaneModal} = useResponsiveLayout ( ) ;
9+ const animationInTiming = rest . animationInTiming ?? ( isInNarrowPaneModal ? CONST . MODAL . ANIMATION_TIMING . DEFAULT_RIGHT_DOCKED_IOS_IN : undefined ) ;
10+ const animationOutTiming = rest . animationOutTiming ?? ( isInNarrowPaneModal ? CONST . MODAL . ANIMATION_TIMING . DEFAULT_RIGHT_DOCKED_IOS_OUT : undefined ) ;
11+
612 return (
713 < BaseModal
814 useNativeDriver
915 // eslint-disable-next-line react/jsx-props-no-spreading
1016 { ...rest }
17+ animationInTiming = { animationInTiming }
18+ animationOutTiming = { animationOutTiming }
1119 >
1220 { children }
1321 </ BaseModal >
You can’t perform that action at this time.
0 commit comments