aboutsummaryrefslogtreecommitdiffstats
path: root/App.js
blob: 7e4caf5398acf755ce15387d110d7e8b827d1693 (plain) (blame)
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
import 'react-native-gesture-handler';
import * as React from 'react';
import { Image, TouchableOpacity } from 'react-native'
import { NavigationContainer, } from '@react-navigation/native';
import { createDrawerNavigator } from '@react-navigation/drawer';
const Drawer = createDrawerNavigator();

import NotesList from "./components/NotesList"
import NoteView from "./components/NoteView"
import CategoryView from "./components/CategoryView"
import Options from "./components/Options"
import CustomDrawerContent from "./components/DrawerContent"

import kIcon from "./assets/kebab.png"

function App() {
  return (
    <NavigationContainer>
      <Drawer.Navigator drawerContent={props => <CustomDrawerContent {...props} />}>
        <Drawer.Screen name="notesList" component={NotesList} options={{
          title: 'Notes list',
          headerRight: () => <TouchableOpacity onPress={() => window.navigation.navigate("options")}><Image source={kIcon} style={{ width: 30, height: 30, marginRight: 10 }} /></TouchableOpacity>,
          headerStyle: {
            backgroundColor: '#ff5a5a',
          },
          headerTintColor: '#ffffff',
          headerTitleStyle: {
            fontWeight: 'bold',
          },
        }} />
        <Drawer.Screen name="addNote" component={NoteView} options={{
          title: 'Add note',
          headerStyle: {
            backgroundColor: '#b9e1ff',
          },
          headerTintColor: '#ffffff',
          headerTitleStyle: {
            fontWeight: 'bold',
          },

        }} />
        <Drawer.Screen name="editNote" component={NoteView} options={{
          title: 'Edit note',
          headerStyle: {
            backgroundColor: '#49d96c',
          },
          headerTintColor: '#ffffff',
          headerTitleStyle: {
            fontWeight: 'bold',
          },

        }} />
        <Drawer.Screen name="addCategory" component={CategoryView} options={{
          title: 'Add category',
          headerStyle: {
            backgroundColor: '#f5ac58',
          },
          headerTintColor: '#ffffff',
          headerTitleStyle: {
            fontWeight: 'bold',
          },

        }} />
        <Drawer.Screen name="options" component={Options} options={{
          title: 'Note list options',
          headerStyle: {
            backgroundColor: 'pink',
          },
          headerTintColor: '#ffffff',
          headerTitleStyle: {
            fontWeight: 'bold',
          },

        }} />
      </Drawer.Navigator>
    </NavigationContainer>
  );
}

export default App;