-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
126 lines (122 loc) · 3.5 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
import { StatusBar } from "expo-status-bar";
import { NavigationContainer } from "@react-navigation/native";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import { createDrawerNavigator } from "@react-navigation/drawer";
import AppointmentsListScreen from "./screens/AppointmentsList";
import AppointmentScreen from "./screens/Appointment";
import SettingsScreen from "./screens/Settings";
import Icon from "@expo/vector-icons/MaterialIcons";
import ColorPalette from "./constants/ColorPalette";
import RemindersScreen from "./screens/Reminders";
import FinancialsScreen from "./screens/Financials";
import SideDrawer from "./components/drawer/SideDrawer";
const Stack = createNativeStackNavigator();
const Drawer = createDrawerNavigator();
function DrawerNavigator() {
return (
<Drawer.Navigator
drawerContent={(props) => <SideDrawer {...props} />}
useLegacyImplementation={true}
screenOptions={{
headerTitleAlign: "center",
drawerActiveTintColor: ColorPalette.primary.main,
drawerContentContainerStyle: { backgroundColor: "#f1f6fb", flex: 1 },
drawerItemStyle: {
borderRadius: 4,
width: "100%",
},
drawerIcon: {
size: 24,
},
}}
>
<Drawer.Screen
name="AppointmentsList"
component={AppointmentsListScreen}
options={{
title: "Прегледи",
drawerIcon: ({ color, size, focused }) => (
<Icon
name="calendar-view-day"
color={
focused ? ColorPalette.primary.main : ColorPalette.grey[700]
}
size={size}
/>
),
}}
/>
<Drawer.Screen
name="Reminders"
component={RemindersScreen}
options={{
title: "Потсетник",
drawerIcon: ({ color, size, focused }) => (
<Icon
name="checklist"
color={
focused ? ColorPalette.primary.main : ColorPalette.grey[700]
}
size={size}
/>
),
}}
/>
<Drawer.Screen
name="Financials"
component={FinancialsScreen}
options={{
title: "Финансии",
drawerIcon: ({ color, size, focused }) => (
<Icon
name="payments"
color={
focused ? ColorPalette.primary.main : ColorPalette.grey[700]
}
size={size}
/>
),
}}
/>
<Drawer.Screen
name="Settings"
component={SettingsScreen}
options={{
title: "Подесувања",
drawerIcon: ({ color, size, focused }) => (
<Icon
name="settings"
color={
focused ? ColorPalette.primary.main : ColorPalette.grey[700]
}
size={size}
/>
),
}}
/>
</Drawer.Navigator>
);
}
export default function App() {
return (
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen
name="Drawer"
component={DrawerNavigator}
options={{
headerShown: false,
}}
/>
<Stack.Screen
name="Appointment"
options={{
headerTitle: "Преглед",
}}
component={AppointmentScreen}
/>
</Stack.Navigator>
<StatusBar style="auto" />
</NavigationContainer>
);
}