aboutsummaryrefslogtreecommitdiff
path: root/src/routes/main/MainStackScreen.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@thetaggid.com>2021-02-11 17:27:30 -0500
committerGitHub <noreply@github.com>2021-02-11 17:27:30 -0500
commitd494b27509066f4d1b61078f1fe6457f20d5f449 (patch)
tree2418b7e9ff40fbb6d51124644065ead0a6f24e8b /src/routes/main/MainStackScreen.tsx
parent2561d20e17a697726d6b77accf79c9da2d1f6ef6 (diff)
parenteeac3efd296656a0ef0a1e5797fec7c9955c7a12 (diff)
Merge pull request #239 from shravyaramesh/tma641-animation-tutorial
[TMA-641] Suggested People: Swipe Up Animation Tutorial
Diffstat (limited to 'src/routes/main/MainStackScreen.tsx')
-rw-r--r--src/routes/main/MainStackScreen.tsx37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/routes/main/MainStackScreen.tsx b/src/routes/main/MainStackScreen.tsx
index 99446432..0b762dff 100644
--- a/src/routes/main/MainStackScreen.tsx
+++ b/src/routes/main/MainStackScreen.tsx
@@ -6,6 +6,7 @@ import {StyleSheet, Text} from 'react-native';
import {normalize} from 'react-native-elements';
import BackIcon from '../../assets/icons/back-arrow.svg';
import {
+ AnimatedTutorial,
CaptionScreen,
CategorySelection,
CreateCustomCategory,
@@ -70,6 +71,34 @@ const MainStackScreen: React.FC<MainStackProps> = ({route}) => {
}
})();
+ const modalStyle: StackNavigationOptions = {
+ cardStyle: {backgroundColor: 'rgba(80,80,80,0.9)'},
+ gestureDirection: 'vertical',
+ cardOverlayEnabled: true,
+ cardStyleInterpolator: ({current: {progress}}) => ({
+ cardStyle: {
+ opacity: progress.interpolate({
+ inputRange: [0, 0.5, 0.9, 1],
+ outputRange: [0, 0.25, 0.7, 1],
+ }),
+ },
+ }),
+ };
+
+ const tutorialModalStyle: StackNavigationOptions = {
+ cardStyle: {backgroundColor: 'rgba(0, 0, 0, 0.5)'},
+ gestureDirection: 'vertical',
+ cardOverlayEnabled: true,
+ cardStyleInterpolator: ({current: {progress}}) => ({
+ cardStyle: {
+ opacity: progress.interpolate({
+ inputRange: [0, 0.5, 0.9, 1],
+ outputRange: [0, 0.25, 0.7, 1],
+ }),
+ },
+ }),
+ };
+
return (
<MainStack.Navigator
screenOptions={{
@@ -115,6 +144,14 @@ const MainStackScreen: React.FC<MainStackProps> = ({route}) => {
/>
)}
<MainStack.Screen
+ name="AnimatedTutorial"
+ component={AnimatedTutorial}
+ options={{
+ ...tutorialModalStyle,
+ }}
+ initialParams={{screenType}}
+ />
+ <MainStack.Screen
name="CaptionScreen"
component={CaptionScreen}
options={{