-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
85 lines (81 loc) · 2.99 KB
/
App.js
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import {StyleSheet, Image} from 'react-native';
import CreateBottomTabNavigator from "@react-navigation/bottom-tabs/src/navigators/createBottomTabNavigator";
import {NavigationContainer} from "@react-navigation/native";
import RebelScreen from "./src/screens/RebelScreen";
import EmpireScreen from "./src/screens/EmpireScreen";
import ItemScreen from "./src/screens/ItemScreen";
import CreateNativeStackNavigator from "@react-navigation/native-stack/src/navigators/createNativeStackNavigator";
import HeroScreen from "./src/screens/HeroScreen";
import CalculatorScreen from "./src/screens/CalculatorScreen";
const Tab = CreateBottomTabNavigator();
const Stack = CreateNativeStackNavigator();
function Rebel({ navigation }) {
return (
<Stack.Navigator>
<Stack.Screen
name={"Heroes"}
options={{ headerShown: false }}
component={RebelScreen}
/>
<Stack.Screen
name={"Hero"}
component={HeroScreen}
options={({route}) => ({title: route.params.heroData.name})}
/>
</Stack.Navigator>
)
}
export default function App() {
return (
<NavigationContainer>
<Tab.Navigator>
<Tab.Screen
name="Rebel"
component={Rebel}
options={{
headerShown: false,
tabBarIcon: ({color}) => (
<Image style={styles.icon} source={require("./assets/icons/rebel_icon.png")}/>
)
}}
/>
<Tab.Screen
name="Empire"
component={EmpireScreen}
options={{
headerShown: false,
tabBarIcon: ({color}) => (
<Image style={styles.icon} source={require("./assets/icons/empire_icon.png")}/>
)
}}
/>
<Tab.Screen
name="Items"
component={ItemScreen}
options={{
headerShown: false,
tabBarIcon: ({color}) => (
<Image style={styles.icon} source={require("./assets/icons/damage_icon.png")}/>
)
}}
/>
<Tab.Screen
name="Calculator"
component={CalculatorScreen}
options={{
headerShown: false,
tabBarIcon: ({color}) => (
<Image style={styles.icon} source={require("./assets/icons/Gaming-Dice-icon.png")}/>
)
}}
/>
</Tab.Navigator>
</NavigationContainer>
);
}
const styles = StyleSheet.create({
icon: {
height: 22,
width: 22
},
});