Skip to content

Commit 163e6ee

Browse files
committed
fix: type TabBarIcon color as ColorValue
Expo Router's Tabs on SDK 56 passes ColorValue to tabBarIcon, which broke typechecking of generated tabs projects against the base TabBarIcon's color: string prop. Align it with the NativewindUI TabBarIcon, which already made this change for SDK 56; @expo/vector-icons accepts string | OpaqueColorValue so ColorValue fits both Expo Router and React Navigation callers.
1 parent 7d87e4b commit 163e6ee

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cli/src/templates/base/components/TabBarIcon.tsx.ejs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import FontAwesome from '@expo/vector-icons/FontAwesome';
2-
import { StyleSheet } from 'react-native';
2+
import { ColorValue, StyleSheet } from 'react-native';
33

44
export const TabBarIcon = (props: {
55
name: React.ComponentProps<typeof FontAwesome>['name'];
6-
color: string;
6+
color: ColorValue;
77
}) => {
88
return <FontAwesome size={28} style={styles.tabBarIcon} {...props} />;
99
};

0 commit comments

Comments
 (0)