diff --git a/src/CONST/index.ts b/src/CONST/index.ts index fcc1a8fe04b0..7423078abc76 100644 --- a/src/CONST/index.ts +++ b/src/CONST/index.ts @@ -1938,6 +1938,8 @@ const CONST = { FAB_OUT: ANIMATION_TIMING_FAB_OUT, RHP_DURATION_IN_WEB: 150, RHP_DURATION_OUT_WEB: 100, + CENTERED_DURATION_IN_WEB: 120, + CENTERED_DURATION_OUT_WEB: 80, }, RHP_ENTER_OFFSET_PX_WEB: 60, }, diff --git a/src/components/Modal/index.tsx b/src/components/Modal/index.tsx index 332c92cd71a3..428ee3f4488c 100644 --- a/src/components/Modal/index.tsx +++ b/src/components/Modal/index.tsx @@ -12,6 +12,15 @@ function Modal({fullscreen = true, onModalHide = () => {}, type, onModalShow = ( const StyleUtils = useStyleUtils(); const [previousStatusBarColor, setPreviousStatusBarColor] = useState(); + const isCentered = + type === CONST.MODAL.MODAL_TYPE.CONFIRM || + type === CONST.MODAL.MODAL_TYPE.CENTERED || + type === CONST.MODAL.MODAL_TYPE.CENTERED_UNSWIPEABLE || + type === CONST.MODAL.MODAL_TYPE.CENTERED_SMALL || + type === CONST.MODAL.MODAL_TYPE.CENTERED_SWIPEABLE_TO_RIGHT; + const animationInTiming = rest.animationInTiming ?? (isCentered ? CONST.MODAL.ANIMATION_TIMING.CENTERED_DURATION_IN_WEB : undefined); + const animationOutTiming = rest.animationOutTiming ?? (isCentered ? CONST.MODAL.ANIMATION_TIMING.CENTERED_DURATION_OUT_WEB : undefined); + const setStatusBarColor = (color = theme.appBG) => { if (!fullscreen) { return; @@ -106,6 +115,8 @@ function Modal({fullscreen = true, onModalHide = () => {}, type, onModalShow = ( return (