We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey guys, is there a way to calculate the tab height?
thanks!
The text was updated successfully, but these errors were encountered:
You can wrap the BottomTabBar from @react-navigation/bottom-tabs in a View, set the Views onLayout prop and read its height from there. Example:
BottomTabBar
@react-navigation/bottom-tabs
View
onLayout
import React from 'react' import { BottomTabBar } from '@react-navigation/bottom-tabs' import { View } from 'react-native' import { useAppContext } from './utils.ts' export function TabBar(props) { const { setContext } = useAppContext() return ( <View collapsable={false} onLayout={event => { const tabBarHeight = event.nativeEvent.layout.height setContext(prevContext => ({ ...prevContext, tabBarHeight, })) }} > <BottomTabBar {...props} /> </View> ) }
Sorry, something went wrong.
e08c91f
No branches or pull requests
Hey guys, is there a way to calculate the tab height?
thanks!
The text was updated successfully, but these errors were encountered: