-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
50 lines (46 loc) · 1.25 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
import 'react-native-gesture-handler';
import React from 'react';
import { ThemeProvider } from 'styled-components';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import Log from "app/components/Log";
import theme from 'app/config/theme';
import Home from 'app/screens/Home';
import LogList from 'app/screens/LogList';
const Stack = createStackNavigator();
export default class App extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<NavigationContainer>
<ThemeProvider theme={ theme }>
<Stack.Navigator initialRouteName="Home" >
<Stack.Screen
name="Home"
options={{
title: '',
headerStyle: {
backgroundColor: theme.FOURTH,
elevation: 0
},
cardShadowEnabled: false,
}}
>
{ props => <Home {...props} theme={ theme }/>}
</Stack.Screen>
<Stack.Screen
name="Logs"
component={LogList}
options={{ headerShown: false }}
/>
<Stack.Screen name="Editor">
{ props => <Log {...props} theme={ theme } date=" 27 June 2020" />}
</Stack.Screen>
</Stack.Navigator>
</ThemeProvider>
</NavigationContainer>
);
}
}