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/components/common/BottomDrawer.tsx | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'src/components/common/BottomDrawer.tsx') diff --git a/src/components/common/BottomDrawer.tsx b/src/components/common/BottomDrawer.tsx index 173823b1..988c1e79 100644 --- a/src/components/common/BottomDrawer.tsx +++ b/src/components/common/BottomDrawer.tsx @@ -6,7 +6,7 @@ import { View, ViewProps, } from 'react-native'; -import Animated from 'react-native-reanimated'; +import Animated, {interpolateColors} from 'react-native-reanimated'; import BottomSheet from 'reanimated-bottom-sheet'; import {SCREEN_HEIGHT, SCREEN_WIDTH} from '../../utils'; @@ -50,6 +50,10 @@ const BottomDrawer: React.FC = (props) => { ); }; + const backgroundColor = interpolateColors(bgAlpha, { + inputRange: [0, 1], + outputColorRange: ['rgba(0,0,0,0.3)', 'rgba(0,0,0,0)'], + }); return ( = (props) => { onPress={() => { setIsOpen(false); }}> - + ); -- cgit v1.2.3-70-g09d2