-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
60 lines (52 loc) · 1.89 KB
/
App.js
File metadata and controls
60 lines (52 loc) · 1.89 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
56
57
58
59
60
import React, { useState, useEffect } from 'react'
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View, Button, } from 'react-native';
import Ionic from 'react-native-vector-icons/Ionicons'
import {NavigationContainer, TabActions} from '@react-navigation/native'
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs'
import Home from './screens/Home'
import Settings from './screens/Settings';
import About from './screens/About';
import { StateProvider } from './StateContext';
export default function App() {
const Tab = createBottomTabNavigator();
return (
<StateProvider>
<StatusBar backgroundColor='#001E6C' style="light"/>
<NavigationContainer>
<Tab.Navigator
screenOptions={({route}) => ({
"tabBarActiveTintColor": "black",
"tabBarInactiveTintColor": "black",
"tabBarShowLabel": false,
headerShown: false,
tabBarStyle: {backgroundColor: '#fff', height: 60,
paddingHorizontal: 5, position: 'absolute',
borderTopWidth: 0, position: 'absolute'},
tabBarIcon: ({focused, size, colour}) => {
let iconName;
if(route.name === 'Xpenz') {
iconName = focused ? 'copy' : 'copy-outline'
} else if(route.name === 'Settings') {
iconName = focused ? 'save' : 'save-outline'
}
else if(route.name === 'About') {
iconName = focused ? 'skull' : 'skull-outline'
}
return <Ionic name={iconName} size={size} colour={colour} />
},
})} >
<Tab.Screen name='Xpenz' component={Home}/>
<Tab.Screen name='Settings' component={Settings}/>
<Tab.Screen name='About' component={About}/>
</Tab.Navigator>
</NavigationContainer>
</StateProvider>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#22ce99',
},
});