Skip to content

Commit db98904

Browse files
Added types to color props.
1 parent c36cbe9 commit db98904

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

app/(tabs)/_layout.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ export default function TabLayout() {
2929
name="index"
3030
options={{
3131
title: "Home",
32-
tabBarIcon: ({ color }) => <TabBarIcon name="code" color={color} />,
32+
tabBarIcon: ({ color }: { color: string }) => (
33+
<TabBarIcon name="code" color={color} />
34+
),
3335
headerRight: () => (
3436
<Link href="/modal" asChild>
3537
<Pressable>
@@ -50,7 +52,7 @@ export default function TabLayout() {
5052
name="jobs"
5153
options={{
5254
title: "Jobs",
53-
tabBarIcon: ({ color }) => (
55+
tabBarIcon: ({ color }: { color: string }) => (
5456
<TabBarIcon name="briefcase" color={color} />
5557
),
5658
}}
@@ -59,14 +61,18 @@ export default function TabLayout() {
5961
name="settings"
6062
options={{
6163
title: "Settings",
62-
tabBarIcon: ({ color }) => <TabBarIcon name="cog" color={color} />,
64+
tabBarIcon: ({ color }: { color: string }) => (
65+
<TabBarIcon name="cog" color={color} />
66+
),
6367
}}
6468
/>
6569
<Tabs.Screen
6670
name="cellular"
6771
options={{
6872
title: "Cellular",
69-
tabBarIcon: ({ color }) => <TabBarIcon name="phone" color={color} />,
73+
tabBarIcon: ({ color }: { color: string }) => (
74+
<TabBarIcon name="phone" color={color} />
75+
),
7076
}}
7177
/>
7278
</Tabs>

0 commit comments

Comments
 (0)