-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
59 lines (55 loc) · 2.19 KB
/
App.js
File metadata and controls
59 lines (55 loc) · 2.19 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
import React from 'react';
import { StatusBar } from 'expo-status-bar';
import { NavigationContainer } from '@react-navigation/native';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { Text } from 'react-native';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import PerformanceScreen from './src/screens/PerformanceScreen';
import AppsScreen from './src/screens/AppsScreen';
import CacheScreen from './src/screens/CacheScreen';
import AboutScreen from './src/screens/AboutScreen';
import { colors, font } from './src/theme';
const Tab = createBottomTabNavigator();
const TAB_ICON = {
Performance: '⚡',
Apps: '📦',
Cache: '🧹',
About: 'ℹ️',
};
export default function App() {
return (
<SafeAreaProvider>
<StatusBar style="light" backgroundColor="#0a0a0a" />
<NavigationContainer>
<Tab.Navigator
screenOptions={({ route }) => ({
headerStyle: { backgroundColor: '#0a0a0a', borderBottomWidth: 1, borderBottomColor: '#181818' },
headerTintColor: colors.accent,
headerTitleStyle: { fontWeight: 'bold', letterSpacing: 1, fontSize: font.lg },
headerTitle: `⚡ TaskManager+`,
tabBarStyle: {
backgroundColor: '#0a0a0a',
borderTopColor: '#181818',
borderTopWidth: 1,
height: 58,
paddingBottom: 6,
},
tabBarActiveTintColor: colors.accent,
tabBarInactiveTintColor: '#444',
tabBarLabelStyle: { fontSize: 10, letterSpacing: 0.5 },
tabBarIcon: ({ focused }) => (
<Text style={{ fontSize: 18, opacity: focused ? 1 : 0.4 }}>
{TAB_ICON[route.name]}
</Text>
),
})}
>
<Tab.Screen name="Performance" component={PerformanceScreen} />
<Tab.Screen name="Apps" component={AppsScreen} />
<Tab.Screen name="Cache" component={CacheScreen} />
<Tab.Screen name="About" component={AboutScreen} />
</Tab.Navigator>
</NavigationContainer>
</SafeAreaProvider>
);
}