forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
300922a
commit 6a60a74
Showing
254 changed files
with
793 additions
and
1,105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 21 additions & 8 deletions
29
src/libs/Navigation/AppNavigator/ModalNavigatorScreenOptions.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,32 @@ | ||
import type {StackNavigationOptions} from '@react-navigation/stack'; | ||
import {CardStyleInterpolators} from '@react-navigation/stack'; | ||
import type {GestureDirection} from '@react-navigation/stack/lib/typescript/src/types'; | ||
import type {PlatformStackNavigationOptions} from '@libs/Navigation/PlatformStackNavigation/types'; | ||
import type {ThemeStyles} from '@styles/index'; | ||
|
||
/** | ||
* Modal stack navigator screen options generator function | ||
* @param themeStyles - The styles object | ||
* @returns The screen options object | ||
*/ | ||
const ModalNavigatorScreenOptions = (themeStyles: ThemeStyles, gestureDirection: GestureDirection = 'horizontal'): StackNavigationOptions => ({ | ||
headerShown: false, | ||
animationEnabled: true, | ||
gestureDirection, | ||
cardStyle: themeStyles.navigationScreenCardStyle, | ||
cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS, | ||
}); | ||
const ModalNavigatorScreenOptions = (themeStyles: ThemeStyles, gestureDirection: GestureDirection = 'horizontal'): PlatformStackNavigationOptions => { | ||
let universalGestureDirection: PlatformStackNavigationOptions['gestureDirection'] | undefined; | ||
let webGestureDirection: GestureDirection | undefined; | ||
if (gestureDirection === 'horizontal' || gestureDirection === 'vertical') { | ||
universalGestureDirection = gestureDirection; | ||
} else { | ||
webGestureDirection = gestureDirection; | ||
} | ||
|
||
return { | ||
headerShown: false, | ||
animation: 'slide_from_right', | ||
gestureDirection: universalGestureDirection, | ||
web: { | ||
cardStyle: themeStyles.navigationScreenCardStyle, | ||
cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS, | ||
gestureDirection: webGestureDirection, | ||
}, | ||
}; | ||
}; | ||
|
||
export default ModalNavigatorScreenOptions; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/libs/Navigation/AppNavigator/Navigators/ExplanationModalNavigator.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/libs/Navigation/AppNavigator/Navigators/FeatureTrainingModalNavigator.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.