From 1cd94d9a012543683126094251b2e5562e2eea21 Mon Sep 17 00:00:00 2001 From: Leon Jiang <35908040+leonyjiang@users.noreply.github.com> Date: Sat, 3 Apr 2021 21:25:32 -0400 Subject: Fix bottom sheet animation --- src/routes/main/MainStackScreen.tsx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/routes') diff --git a/src/routes/main/MainStackScreen.tsx b/src/routes/main/MainStackScreen.tsx index b72ab779..8068b893 100644 --- a/src/routes/main/MainStackScreen.tsx +++ b/src/routes/main/MainStackScreen.tsx @@ -98,11 +98,10 @@ const MainStackScreen: React.FC = ({route}) => { cardOverlayEnabled: true, cardStyleInterpolator: ({current: {progress}}) => ({ cardStyle: { - // TODO: (Leon) use reanimated v2 - // opacity: progress.interpolate({ - // inputRange: [0, 0.5, 0.9, 1], - // outputRange: [0, 0.25, 0.7, 1], - // }), + opacity: progress.interpolate({ + inputRange: [0, 0.5, 0.9, 1], + outputRange: [0, 0.25, 0.7, 1], + }), }, }), }; @@ -349,11 +348,10 @@ export const modalStyle: StackNavigationOptions = { cardOverlayEnabled: true, cardStyleInterpolator: ({current: {progress}}) => ({ cardStyle: { - // TODO: (Leon) use reanimated v2 - // opacity: progress.interpolate({ - // inputRange: [0, 0.5, 0.9, 1], - // outputRange: [0, 0.25, 0.7, 1], - // }), + opacity: progress.interpolate({ + inputRange: [0, 0.5, 0.9, 1], + outputRange: [0, 0.25, 0.7, 1], + }), }, }), }; -- cgit v1.2.3-70-g09d2