feat: update tab bars with blurview

This commit is contained in:
Lei Nelissen
2023-04-22 21:58:27 +02:00
parent 4509ef1ec6
commit 7601408d49
6 changed files with 101 additions and 71 deletions

View File

@@ -1,6 +1,6 @@
import { useBottomTabBarHeight } from '@react-navigation/bottom-tabs';
import { useRef, useEffect } from 'react';
import { Animated, Keyboard, KeyboardEvent } from 'react-native';
import { Animated, Easing, Keyboard, KeyboardEvent } from 'react-native';
/**
* This returns an animated height that the keyboard is poking up from the
@@ -15,9 +15,10 @@ export const useKeyboardHeight = () => {
useEffect(() => {
const keyboardWillShow = (e: KeyboardEvent) => {
Animated.timing(keyboardHeight, {
duration: e.duration,
duration: e.duration - 20,
toValue: tabBarHeight - e.endCoordinates.height,
useNativeDriver: true,
easing: Easing.ease,
}).start();
};