-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp-tabs.tsx
More file actions
48 lines (46 loc) · 1.67 KB
/
app-tabs.tsx
File metadata and controls
48 lines (46 loc) · 1.67 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
import { NativeTabs } from 'expo-router/unstable-native-tabs';
import { Platform } from 'react-native';
import WebTabLayout from '@/components/app-tabs.web';
import { useThemeColors } from '@/hooks/use-theme-colors';
export default function TabLayout() {
const colors = useThemeColors();
if (Platform.OS === 'android' && Platform.isTV) {
return <WebTabLayout />;
}
return (
<NativeTabs
backgroundColor={colors.background}
indicatorColor={colors.background}
tintColor={colors.tabBarBackground}
iconColor={colors.text}
badgeTextColor={colors.text}
labelStyle={{
default: { color: colors.text },
selected: { color: colors.tabBarBackground },
}}
>
<NativeTabs.Trigger name="index">
<NativeTabs.Trigger.Label>Home</NativeTabs.Trigger.Label>
{Platform.OS === 'ios' ? <NativeTabs.Trigger.Icon sf="house" /> : null}
</NativeTabs.Trigger>
<NativeTabs.Trigger name="tvdemo">
<NativeTabs.Trigger.Label>
Focus/hover/active styles
</NativeTabs.Trigger.Label>
{Platform.OS === 'ios' ? (
<NativeTabs.Trigger.Icon sf="tv.fill" />
) : null}
</NativeTabs.Trigger>
<NativeTabs.Trigger name="video">
<NativeTabs.Trigger.Label>Video</NativeTabs.Trigger.Label>
{Platform.OS === 'ios' ? <NativeTabs.Trigger.Icon sf="video" /> : null}
</NativeTabs.Trigger>
<NativeTabs.Trigger name="legendlistdemo">
<NativeTabs.Trigger.Label>LegendList</NativeTabs.Trigger.Label>
{Platform.OS === 'ios' ? (
<NativeTabs.Trigger.Icon sf="list.bullet" />
) : null}
</NativeTabs.Trigger>
</NativeTabs>
);
}