TabsInDrawer.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /**
  2. * @flow
  3. */
  4. import React from 'react';
  5. import { Platform, ScrollView } from 'react-native';
  6. import { createDrawerNavigator } from 'react-navigation';
  7. import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
  8. import SimpleTabs from './SimpleTabs';
  9. import StacksOverTabs from './StacksOverTabs';
  10. const TabsInDrawer = createDrawerNavigator({
  11. SimpleTabs: {
  12. screen: SimpleTabs,
  13. navigationOptions: {
  14. drawer: () => ({
  15. label: 'Simple Tabs',
  16. icon: ({ tintColor }) => (
  17. <MaterialIcons
  18. name="filter-1"
  19. size={24}
  20. style={{ color: tintColor }}
  21. />
  22. ),
  23. }),
  24. },
  25. },
  26. StacksOverTabs: {
  27. screen: StacksOverTabs,
  28. navigationOptions: {
  29. drawer: () => ({
  30. label: 'Stacks Over Tabs',
  31. icon: ({ tintColor }) => (
  32. <MaterialIcons
  33. name="filter-2"
  34. size={24}
  35. style={{ color: tintColor }}
  36. />
  37. ),
  38. }),
  39. },
  40. },
  41. });
  42. export default TabsInDrawer;