This repository has been archived by the owner on Jun 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
45 lines (40 loc) · 1.36 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
import React from "react"
import { StyleSheet } from "react-native"
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs"
import { NavigationContainer } from "@react-navigation/native"
import { ApplicationProvider, BottomNavigation, BottomNavigationTab } from "@ui-kitten/components"
import * as eva from "@eva-design/eva"
import ListOfNotes from "./src/ListOfNotes"
import CreateNote from "./src/CreateNote"
import Note from "./src/Note"
const { Navigator, Screen } = createBottomTabNavigator()
const BottomTabBar = ({ navigation, state }) => (
<BottomNavigation selectedIndex={state.index} onSelect={(index) => navigation.navigate(state.routeNames[index])}>
<BottomNavigationTab title="Create Note" />
<BottomNavigationTab title="All Notes" />
</BottomNavigation>
)
const TabNavigator = () => (
<Navigator tabBar={(props) => <BottomTabBar {...props} />}>
<Screen name="CreateNote" component={CreateNote} />
<Screen name="ListOfNotes" component={ListOfNotes} />
<Screen name="Note" component={Note} />
</Navigator>
)
export default function App() {
return (
<ApplicationProvider {...eva} theme={eva.light}>
<NavigationContainer>
<TabNavigator />
</NavigationContainer>
</ApplicationProvider>
)
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#ffffff",
alignItems: "center",
justifyContent: "center"
}
})