Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/CONST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1461,6 +1461,8 @@ const CONST = {
ANIMATION_TIMING: {
DEFAULT_IN: 300,
DEFAULT_OUT: 200,
DEFAULT_RIGHT_DOCKED_IOS_IN: 500,
DEFAULT_RIGHT_DOCKED_IOS_OUT: 400,
FAB_IN: 350,
FAB_OUT: 200,
},
Expand Down
8 changes: 8 additions & 0 deletions src/components/Modal/index.ios.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
import React from 'react';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import CONST from '@src/CONST';
import BaseModal from './BaseModal';
import type BaseModalProps from './types';

function Modal({children, ...rest}: BaseModalProps) {
const {isInNarrowPaneModal} = useResponsiveLayout();
const animationInTiming = rest.animationInTiming ?? (isInNarrowPaneModal ? CONST.MODAL.ANIMATION_TIMING.DEFAULT_RIGHT_DOCKED_IOS_IN : undefined);
const animationOutTiming = rest.animationOutTiming ?? (isInNarrowPaneModal ? CONST.MODAL.ANIMATION_TIMING.DEFAULT_RIGHT_DOCKED_IOS_OUT : undefined);

return (
<BaseModal
useNativeDriver
// eslint-disable-next-line react/jsx-props-no-spreading
{...rest}
animationInTiming={animationInTiming}
animationOutTiming={animationOutTiming}
>
{children}
</BaseModal>
Expand Down
3 changes: 1 addition & 2 deletions src/components/ValidateCodeActionModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,9 @@ function ValidateCodeActionModal({
onClose={hide}
onModalHide={onModalHide ?? hide}
onBackdropPress={() => Navigation.dismissModal()}
hideModalContentWhileAnimating
useNativeDriver
shouldUseModalPaddingStyle={false}
animationInTiming={disableAnimation ? 1 : undefined}
shouldUseReanimatedModal
>
<ScreenWrapper
includeSafeAreaPaddingBottom
Expand Down
Loading