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.

AppStack.js 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import React from 'react';
  2. import { createDrawerNavigator } from '@react-navigation/drawer';
  3. import CustomDrawer from '../components/CustomDrawer/CustomDrawer';
  4. import TabNavigator from './TabNavigator';
  5. import Ionicons from '@expo/vector-icons/Ionicons';
  6. import SettingsScreen from '../screens/SettingsScreen';
  7. import ProfileScreen from '../screens/ProfileScreen';
  8. const Drawer = createDrawerNavigator();
  9. const AppStack = () => {
  10. return (
  11. <Drawer.Navigator drawerContent={props => <CustomDrawer {...props} />}
  12. screenOptions={{
  13. headerShown: false,
  14. drawerActiveBackgroundColor: '#aa18ea',
  15. drawerActiveTintColor: '#fff',
  16. drawerInactiveTintColor: '#333',
  17. drawerLabelStyle: {
  18. marginLeft: 5,
  19. fontSize: 16
  20. }
  21. }}
  22. >
  23. <Drawer.Screen name='Home' component={TabNavigator} options={{
  24. drawerIcon: ({color}) => (
  25. <Ionicons name='home-outline' size={22} color={color} />
  26. )
  27. }} />
  28. <Drawer.Screen name='Profile' component={ProfileScreen} options={{
  29. drawerIcon: ({color}) => (
  30. <Ionicons name='person-outline' size={22} color={color} />
  31. )
  32. }} />
  33. <Drawer.Screen name='Settings' component={SettingsScreen} options={{
  34. drawerIcon: ({color}) => (
  35. <Ionicons name='settings-outline' size={22} color={color} />
  36. )
  37. }} />
  38. </Drawer.Navigator>
  39. )
  40. }
  41. export default AppStack;