aboutsummaryrefslogtreecommitdiff
path: root/src/components/common/BottomDrawer.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-04-07 16:36:34 -0400
committerGitHub <noreply@github.com>2021-04-07 16:36:34 -0400
commit4cf3bc720ebcc0b16d158caf60fbdf091621c327 (patch)
tree97d8db434060a7bf8579bb2975f9be25331ecb73 /src/components/common/BottomDrawer.tsx
parenta3abb3abe322ea84306e1a12cec46972a81a37de (diff)
parent6db092b4b88a71c53088a14e330ec73e208ad958 (diff)
Merge pull request #354 from TaggiD-Inc/chat-poc
[POC] Chat
Diffstat (limited to 'src/components/common/BottomDrawer.tsx')
-rw-r--r--src/components/common/BottomDrawer.tsx18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/components/common/BottomDrawer.tsx b/src/components/common/BottomDrawer.tsx
index bef9434a..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<BottomDrawerProps> = (props) => {
);
};
+ const backgroundColor = interpolateColors(bgAlpha, {
+ inputRange: [0, 1],
+ outputColorRange: ['rgba(0,0,0,0.3)', 'rgba(0,0,0,0)'],
+ });
return (
<Modal
transparent
@@ -75,17 +79,7 @@ const BottomDrawer: React.FC<BottomDrawerProps> = (props) => {
onPress={() => {
setIsOpen(false);
}}>
- <Animated.View
- style={[
- styles.backgroundView,
- {
- backgroundColor: Animated.interpolateColors(bgAlpha, {
- inputRange: [0, 1],
- outputColorRange: ['rgba(0,0,0,0.3)', 'rgba(0,0,0,0)'],
- }),
- },
- ]}
- />
+ <Animated.View style={[styles.backgroundView, {backgroundColor}]} />
</TouchableWithoutFeedback>
</Modal>
);