-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_layout.tsx
More file actions
76 lines (73 loc) · 1.98 KB
/
_layout.tsx
File metadata and controls
76 lines (73 loc) · 1.98 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import Ionicons from '@expo/vector-icons/Ionicons';
import { Tabs } from 'expo-router';
import React from 'react';
import { Platform, StyleSheet } from 'react-native';
import { HapticTab } from '@/components/haptic-tab';
import { ShowcaseColors as C } from '@/constants/showcase-theme';
export default function TabLayout() {
return (
<Tabs
screenOptions={{
headerShown: false,
tabBarButton: HapticTab,
tabBarActiveTintColor: C.textPrimary,
tabBarInactiveTintColor: C.textTertiary,
tabBarStyle: styles.tabBar,
tabBarLabelStyle: styles.tabLabel,
}}>
<Tabs.Screen
name="index"
options={{
title: 'Showcase',
tabBarIcon: ({ color, size }) => (
<Ionicons name="sparkles-outline" size={size ?? 22} color={color} />
),
}}
/>
<Tabs.Screen
name="kitchen-sink"
options={{
title: 'Kitchen Sink',
tabBarIcon: ({ color, size }) => (
<Ionicons name="layers-outline" size={size ?? 22} color={color} />
),
}}
/>
<Tabs.Screen
name="stress-test"
options={{
title: 'Stress Test',
tabBarIcon: ({ color, size }) => (
<Ionicons name="speedometer-outline" size={size ?? 22} color={color} />
),
}}
/>
<Tabs.Screen
name="playground"
options={{
title: 'Playground',
tabBarIcon: ({ color, size }) => (
<Ionicons name="color-palette-outline" size={size ?? 22} color={color} />
),
}}
/>
<Tabs.Screen
name="explore"
options={{ href: null }}
/>
</Tabs>
);
}
const styles = StyleSheet.create({
tabBar: {
backgroundColor: C.bgPrimary,
borderTopColor: C.border,
borderTopWidth: StyleSheet.hairlineWidth,
height: Platform.OS === 'ios' ? 84 : 60,
paddingTop: 4,
},
tabLabel: {
fontSize: 11,
fontWeight: '500',
},
});