-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcustomNavigator.js
More file actions
60 lines (57 loc) · 1.49 KB
/
customNavigator.js
File metadata and controls
60 lines (57 loc) · 1.49 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 { Provider } from "react-redux";
import { createStore } from "redux";
import { myReducer } from "./reducer";
import InnerApp from "./InnerApp";
import React from "react";
import "react-native-gesture-handler";
import { View, Text, StyleSheet, Dimensions } from "react-native";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { MaterialCommunityIcons } from "@expo/vector-icons";
const Tab = createBottomTabNavigator();
const height = Dimensions.get("window").height;
export default function customNavigationBar({ navigation }) {
return (
<View style={styles.container}>
<Text
style={styles.homeTitle}
onPress={() => {
console.log("HomeTitle");
navigation.navigate("Home");
}}
>
<MaterialCommunityIcons name="home" size={24} color="black" />
Home
</Text>
<Text
style={styles.mapTitle}
onPress={() => {
console.log("MapTitle");
navigation.navigate("Map");
}}
>
<MaterialCommunityIcons name="map-marker" size={24} color="black" />
Map
</Text>
</View>
);
}
const styles = StyleSheet.create({
container: {
minHeight: 100,
flex: 0,
backgroundColor: "#fff",
alignItems: "center",
justifyContent: "center",
flexDirection: "row",
},
map: {
height,
},
homeTitle: {
flex: 0,
alignItems: "center",
justifyContent: "center",
marginRight: "40%",
},
mapTitle: {},
});