import * as React from 'react'; import {createStackNavigator, TransitionPresets} from '@react-navigation/stack'; import {createMaterialBottomTabNavigator} from "@react-navigation/material-bottom-tabs"; import HomeScreen from '../screens/HomeScreen'; import PlanningScreen from '../screens/Planning/PlanningScreen'; import PlanningDisplayScreen from '../screens/Planning/PlanningDisplayScreen'; import ProxiwashScreen from '../screens/Proxiwash/ProxiwashScreen'; import ProxiwashAboutScreen from '../screens/Proxiwash/ProxiwashAboutScreen'; import ProximoMainScreen from '../screens/Proximo/ProximoMainScreen'; import ProximoListScreen from "../screens/Proximo/ProximoListScreen"; import ProximoAboutScreen from "../screens/Proximo/ProximoAboutScreen"; import PlanexScreen from '../screens/Websites/PlanexScreen'; import {MaterialCommunityIcons} from "@expo/vector-icons"; import AsyncStorageManager from "../managers/AsyncStorageManager"; import HeaderButton from "../components/HeaderButton"; import {withTheme} from 'react-native-paper'; import i18n from "i18n-js"; const TAB_ICONS = { Home: 'triangle', Planning: 'calendar-range', Proxiwash: 'tshirt-crew', Proximo: 'cart', Planex: 'clock', }; const defaultScreenOptions = { gestureEnabled: true, cardOverlayEnabled: true, ...TransitionPresets.SlideFromRightIOS, }; function getDrawerButton(navigation: Object) { return ( ); } const ProximoStack = createStackNavigator(); function ProximoStackComponent() { return ( { const openDrawer = getDrawerButton.bind(this, navigation); return { title: 'Proximo', headerLeft: openDrawer }; }} component={ProximoMainScreen} /> ); } const ProxiwashStack = createStackNavigator(); function ProxiwashStackComponent() { return ( { const openDrawer = getDrawerButton.bind(this, navigation); return { title: 'Proxiwash', headerLeft: openDrawer }; }} /> ); } const PlanningStack = createStackNavigator(); function PlanningStackComponent() { return ( { const openDrawer = getDrawerButton.bind(this, navigation); return { title: 'Planning', headerLeft: openDrawer }; }} /> ); } const HomeStack = createStackNavigator(); function HomeStackComponent() { return ( { const openDrawer = getDrawerButton.bind(this, navigation); return { title: i18n.t('screens.home'), headerLeft: openDrawer }; }} /> ); } const PlanexStack = createStackNavigator(); function PlanexStackComponent() { return ( { const openDrawer = getDrawerButton.bind(this, navigation); return { title: 'Planex', headerLeft: openDrawer }; }} /> ); } const Tab = createMaterialBottomTabNavigator(); function TabNavigator(props) { const {colors} = props.theme; return ( ({ tabBarIcon: ({focused, color, size}) => { let icon = TAB_ICONS[route.name]; // tintColor is ignoring activeColor and inactiveColor for some reason icon = focused ? icon : icon + ('-outline'); return ; }, })} activeColor={colors.primary} inactiveColor={colors.tabIcon} > ); } export default withTheme(TabNavigator);