191d99453SEvan Baconimport { BottomTabNavigationProp } from '@react-navigation/bottom-tabs'; 291d99453SEvan Baconimport { createStackNavigator } from '@react-navigation/stack'; 391d99453SEvan Baconimport * as React from 'react'; 491d99453SEvan Bacon 591d99453SEvan Baconimport TabIcon from '../components/TabIcon'; 691d99453SEvan Baconimport { Layout } from '../constants'; 791d99453SEvan Baconimport ExpoComponents from '../screens/ExpoComponentsScreen'; 891d99453SEvan Baconimport { Screens } from './ExpoComponents'; 991d99453SEvan Baconimport StackConfig from './StackConfig'; 1091d99453SEvan Bacon 1191d99453SEvan Baconconst Stack = createStackNavigator(); 1291d99453SEvan Bacon 1391d99453SEvan Baconfunction ExpoComponentsStackNavigator(props: { navigation: BottomTabNavigationProp<any> }) { 1491d99453SEvan Bacon return ( 1591d99453SEvan Bacon <Stack.Navigator {...props} {...StackConfig}> 1691d99453SEvan Bacon <Stack.Screen 1791d99453SEvan Bacon name="ExpoComponents" 1891d99453SEvan Bacon options={{ title: Layout.isSmallDevice ? 'Expo SDK Components' : 'Components in Expo SDK' }} 1991d99453SEvan Bacon component={ExpoComponents} 2091d99453SEvan Bacon /> 2191d99453SEvan Bacon {Object.keys(Screens).map(name => ( 2291d99453SEvan Bacon <Stack.Screen 2391d99453SEvan Bacon name={name} 2491d99453SEvan Bacon key={name} 2591d99453SEvan Bacon component={Screens[name]} 2691d99453SEvan Bacon options={(Screens[name] as any).navigationOptions ?? {}} 2791d99453SEvan Bacon /> 2891d99453SEvan Bacon ))} 2991d99453SEvan Bacon </Stack.Navigator> 3091d99453SEvan Bacon ); 3191d99453SEvan Bacon} 32*ea08dda8SEvan Bacon 33*ea08dda8SEvan Baconconst icon = ({ focused }: { focused: boolean }) => { 34*ea08dda8SEvan Bacon return <TabIcon name="cards-playing-outline" focused={focused} />; 35*ea08dda8SEvan Bacon}; 3691d99453SEvan BaconExpoComponentsStackNavigator.navigationOptions = { 3791d99453SEvan Bacon title: 'Expo Components', 3891d99453SEvan Bacon tabBarLabel: 'Components', 39*ea08dda8SEvan Bacon tabBarIcon: icon, 40*ea08dda8SEvan Bacon drawerIcon: icon, 4191d99453SEvan Bacon}; 4291d99453SEvan Baconexport default ExpoComponentsStackNavigator; 43