improve navigation tab hitboxes

This commit is contained in:
ppc
2024-08-16 12:34:56 +01:00
parent 1f74194d85
commit 0291f3a28d
+5 -5
View File
@@ -18,10 +18,10 @@ export function AMUITabBar({state, descriptors, navigation}) {
}}>
<View
style={{
gap: 15,
height: 60,
flexDirection: "row",
alignItems: "center",
justifyContent: "space-around",
alignItems: "stretch",
}}>
{state.routes.map((route, index) => {
const {options} = descriptors[route.key];
@@ -40,11 +40,11 @@ export function AMUITabBar({state, descriptors, navigation}) {
return (
<TouchableOpacity
key={route.key}
onPress={onPress}
accessibilityRole="button"
accessibilityLabel={options.tabBarAccessibilityLabel}
style={{paddingVertical: 15, paddingHorizontal: 35}}
testID={options.tabBarTestID}
onPress={onPress}>
accessibilityLabel={options.tabBarAccessibilityLabel}
style={{flexGrow: 1, alignItems: "center", justifyContent: "center"}}>
{options.tabBarIcon({color: isFocused ? theme.colors.primary : theme.colors.outline, size: 24})}
</TouchableOpacity>
);