2025-01-28 08:19:46 -06:00
|
|
|
import { useBottomTabBarHeight } from '@react-navigation/bottom-tabs';
|
|
|
|
import { BlurView } from 'expo-blur';
|
|
|
|
import { StyleSheet } from 'react-native';
|
|
|
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
|
|
|
2025-01-28 10:17:33 -06:00
|
|
|
const BlurTabBarBackground = () => {
|
2025-01-28 08:19:46 -06:00
|
|
|
return (
|
|
|
|
<BlurView
|
|
|
|
// System chrome material automatically adapts to the system's theme
|
|
|
|
// and matches the native tab bar appearance on iOS.
|
2025-01-28 08:45:02 -06:00
|
|
|
tint='systemChromeMaterial'
|
2025-01-28 08:19:46 -06:00
|
|
|
intensity={100}
|
|
|
|
style={StyleSheet.absoluteFill}
|
|
|
|
/>
|
|
|
|
);
|
2025-01-28 10:17:33 -06:00
|
|
|
};
|
|
|
|
export default BlurTabBarBackground;
|
2025-01-28 08:19:46 -06:00
|
|
|
|
2025-01-28 10:17:33 -06:00
|
|
|
export const useBottomTabOverflow = () => {
|
2025-01-28 08:19:46 -06:00
|
|
|
const tabHeight = useBottomTabBarHeight();
|
|
|
|
const { bottom } = useSafeAreaInsets();
|
|
|
|
return tabHeight - bottom;
|
2025-01-28 10:17:33 -06:00
|
|
|
};
|