-
Notifications
You must be signed in to change notification settings - Fork 5
/
App.js
140 lines (129 loc) · 3.44 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
import React, { Component } from 'react';
import { StyleSheet, Text, View, Image } from 'react-native';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { createStackNavigator } from '@react-navigation/stack';
import { NavigationContainer } from '@react-navigation/native';
import Calculator from './screens/calculator';
const Tab = createBottomTabNavigator();
const HomeStack = createStackNavigator();
/*
SipStack() {
return (
<HomeStack.Navigator>
<HomeStack.Screen
name="SIP Calculator"
component={Sip}
headerTitle="SIP Calculator"
/>
</HomeStack.Navigator>
);
}
EMIStack() {
return (
<HomeStack.Navigator>
<HomeStack.Screen
name="EMI Calculator"
component={Calculator}
headerTitle="EMI Calculator"
/>
</HomeStack.Navigator>
);
}
render() {
return (
<ApplicationProvider {...eva} theme={eva.light}>
<NavigationContainer>
<Tab.Navigator
initialRouteName="SIP Calculator"
tabBarOptions={{
activeTintColor: "blue",
}}
>
<Tab.Screen
name="Home"
component={this.SipStack}
options={{
tabBarLabel: "Home",
title: "SIP Calculator",
tabBarIcon: ({ color, size }) => (
<MaterialCommunityIcons
name="calculator"
color={color}
size={size}
/>
),
}}
/>
<Tab.Screen
name="EMI"
component={this.EMIStack}
options={{
tabBarLabel: "Calculator",
title: "EMI Calculator",
tabBarIcon: ({ color, size }) => (
<MaterialCommunityIcons
name="credit-card"
color={color}
size={size}
/>
),
}}
/>
<Tab.Screen
name="Fir se home"
component={Sip}
options={{
tabBarLabel: "Insurance",
tabBarIcon: ({ color, size }) => (
<MaterialCommunityIcons
name="home"
color={color}
size={size}
/>
),
}}
/>
</Tab.Navigator>
</NavigationContainer>
</ApplicationProvider>
);
}
}
*/
function Home() {
return (
<HomeStack.Navigator screenOptions={{ headerShown: false }}>
<HomeStack.Screen name="Calculator" component={Calculator} />
</HomeStack.Navigator>
);
}
export default function App() {
return (
<NavigationContainer>
<Home />
</NavigationContainer>
);
}
// /export default function App() {
// return (
// <View style={styles.container}>
// <Text onPress={() => console.log("pressed")}>
// Open up App.js to start working on your app!!!!!
// </Text>
// <Image
// source={{
// width: 300,
// height: 300,
// uri: "https://picsum.photos/id/1/200/300",
// }}
// ></Image>
// <StatusBar style="auto" />
// </View>
// );
// }
const styles = StyleSheet.create({
container: {
backgroundColor: '#fff',
color: 'red',
},
});