Application Android et IOS pour l'amicale des élèves https://play.google.com/store/apps/details?id=fr.amicaleinsat.application
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MainTabNavigator.js 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import * as React from 'react';
  2. import {createMaterialBottomTabNavigator} from "react-navigation-material-bottom-tabs";
  3. import HomeScreen from '../screens/HomeScreen';
  4. import PlanningScreen from '../screens/PlanningScreen';
  5. import ProxiwashScreen from '../screens/ProxiwashScreen';
  6. import ProximoMainScreen from '../screens/Proximo/ProximoMainScreen';
  7. import PlanexScreen from '../screens/PlanexScreen';
  8. import CustomMaterialIcon from "../components/CustomMaterialIcon";
  9. import ThemeManager from "../utils/ThemeManager";
  10. const TAB_ICONS = {
  11. Home: 'triangle',
  12. Planning: 'calendar-range',
  13. Proxiwash: 'washing-machine',
  14. Proximo: 'shopping',
  15. Planex: 'timetable',
  16. };
  17. export default createMaterialBottomTabNavigator({
  18. Home: {screen: HomeScreen},
  19. Planning: {screen: PlanningScreen,},
  20. Proxiwash: {screen: ProxiwashScreen,},
  21. Proximo: {screen: ProximoMainScreen,},
  22. Planex: {screen: PlanexScreen},
  23. }, {
  24. defaultNavigationOptions: ({navigation}) => ({
  25. tabBarIcon: ({focused, horizontal, tintColor}) => {
  26. let icon = TAB_ICONS[navigation.state.routeName];
  27. return <CustomMaterialIcon icon={icon} color={tintColor}/>;
  28. }
  29. }),
  30. order: ['Proximo', 'Planning', 'Home', 'Proxiwash', 'Planex'],
  31. initialRouteName: 'Home',
  32. activeColor: '#f0edf6',
  33. inactiveColor: '#4e1108',
  34. backBehavior: 'initialRoute',
  35. barStyle: {backgroundColor: ThemeManager.getCurrentThemeVariables().brandPrimary},
  36. });