forked from Technigo/project-react-native-app
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathApp.js
More file actions
55 lines (48 loc) · 1.76 KB
/
App.js
File metadata and controls
55 lines (48 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import React from 'react'
import { NavigationContainer } from '@react-navigation/native'
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'
import { Ionicons } from '@expo/vector-icons'
import Home from './screens/Home'
import DesignAMeme from './screens/DesignAMeme'
import CloudTheCat from './screens/CloudTheCat'
import ShakeACutie from './screens/ShakeACutie'
const Tab = createBottomTabNavigator()
const App = () => {
return (
<NavigationContainer>
<Tab.Navigator
screenOptions={({ route }) => ({
tabBarIcon: ({ focused, color, size }) => {
let iconName
if (route.name === 'Home') {
iconName = focused
? 'ios-home'
: 'ios-home-outline'
} else if (route.name === 'Design a meme') {
iconName = focused
? 'ios-build'
: 'ios-build-outline'
} else if (route.name === 'Shake a cutie') {
iconName = focused
? 'ios-shuffle'
: 'ios-shuffle-outline'
} else if (route.name === 'Cloud the cat') {
iconName = focused
? 'ios-game-controller'
: 'ios-game-controller-outline'
}
return <Ionicons name={iconName} size={size} color={color} />
},
tabBarActiveTintColor: '#e63946',
tabBarInactiveTintColor: 'gray',
})}
>
<Tab.Screen name="Home" component={Home} />
<Tab.Screen name="Design a meme" component={DesignAMeme} />
<Tab.Screen name="Cloud the cat" component={CloudTheCat} />
<Tab.Screen name="Shake a cutie" component={ShakeACutie} />
</Tab.Navigator>
</NavigationContainer>
)
}
export default App