fix: fix default BottomTabBar button (#161)

This commit is contained in:
Oliver Winter
2019-11-04 17:05:05 +01:00
committed by Satyajit Sahoo
parent c41c824aae
commit 22cb675608
2 changed files with 4 additions and 5 deletions

View File

@@ -13,7 +13,6 @@ import { Route, NavigationContext } from '@react-navigation/core';
import { SafeAreaConsumer } from 'react-native-safe-area-context';
import TabBarIcon from './TabBarIcon';
import TouchableWithoutFeedbackWrapper from './TouchableWithoutFeedbackWrapper';
import { BottomTabBarProps, BottomTabBarButtonProps } from '../types';
type State = {
@@ -265,9 +264,7 @@ export default class TabBarBottom extends React.Component<Props, State> {
getAccessibilityLabel,
getAccessibilityRole,
getAccessibilityStates,
renderButton = (props: BottomTabBarButtonProps) => (
<TouchableWithoutFeedbackWrapper {...props} />
),
renderButton,
getTestID,
style,
tabStyle,

View File

@@ -5,12 +5,14 @@ import {
AccessibilityRole,
AccessibilityStates,
} from 'react-native';
import { Route, CommonActions } from '@react-navigation/core';
import { TabNavigationState } from '@react-navigation/routers';
// eslint-disable-next-line import/no-unresolved
import { ScreenContainer } from 'react-native-screens';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import TouchableWithoutFeedbackWrapper from './TouchableWithoutFeedbackWrapper';
import ResourceSavingScene from './ResourceSavingScene';
import BottomTabBar from './BottomTabBar';
import {
@@ -63,7 +65,7 @@ export default class BottomTabView extends React.Component<Props, State> {
return options.tabBarButton(rest);
}
return undefined;
return <TouchableWithoutFeedbackWrapper {...rest} />;
};
private renderIcon = ({