Skip to content

Commit 584f215

Browse files
committed
Codegen types for android
1 parent 25c17bd commit 584f215

File tree

2 files changed

+35
-27
lines changed

2 files changed

+35
-27
lines changed

src/fabric/bottom-tabs/BottomTabsNativeComponent.ts

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ type NativeFocusChangeEvent = {
1515
repeatedSelectionHandledBySpecialEffect: boolean;
1616
};
1717

18-
type TabBarItemLabelVisibilityMode =
19-
| 'auto'
20-
| 'selected'
21-
| 'labeled'
22-
| 'unlabeled';
23-
2418
type TabBarMinimizeBehavior =
2519
| 'automatic'
2620
| 'never'
@@ -40,25 +34,6 @@ export interface NativeProps extends ViewProps {
4034
// Appearance
4135
// tabBarAppearance?: TabBarAppearance; // Does not work due to codegen issue.
4236

43-
// Android-specific
44-
tabBarBackgroundColor?: ColorValue;
45-
tabBarItemTitleFontFamily?: string;
46-
tabBarItemTitleFontSize?: CT.Float;
47-
tabBarItemTitleFontSizeActive?: CT.Float;
48-
tabBarItemTitleFontWeight?: string;
49-
tabBarItemTitleFontStyle?: string;
50-
tabBarItemTitleFontColor?: ColorValue;
51-
tabBarItemTitleFontColorActive?: ColorValue;
52-
tabBarItemIconColor?: ColorValue;
53-
tabBarItemIconColorActive?: ColorValue;
54-
tabBarItemActiveIndicatorColor?: ColorValue;
55-
tabBarItemActiveIndicatorEnabled?: CT.WithDefault<boolean, true>;
56-
tabBarItemRippleColor?: ColorValue;
57-
tabBarItemLabelVisibilityMode?: CT.WithDefault<
58-
TabBarItemLabelVisibilityMode,
59-
'auto'
60-
>;
61-
6237
// iOS-specific
6338
tabBarTintColor?: ColorValue;
6439
tabBarMinimizeBehavior?: CT.WithDefault<TabBarMinimizeBehavior, 'automatic'>;

src/fabric/bottom-tabs/BottomTabsScreenNativeComponent.ts

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,38 @@ export type Appearance = {
5353
tabBarBlurEffect?: CT.WithDefault<BlurEffect, 'systemDefault'>;
5454
};
5555

56+
type TabBarItemLabelVisibilityMode =
57+
| 'auto'
58+
| 'selected'
59+
| 'labeled'
60+
| 'unlabeled';
61+
62+
export type ItemAppearanceAndroid = {
63+
tabBarBackgroundColor?: ColorValue;
64+
tabBarItemTitleFontFamily?: string;
65+
tabBarItemTitleFontSize?: CT.Float;
66+
tabBarItemTitleFontWeight?: string;
67+
tabBarItemTitleFontStyle?: string;
68+
tabBarItemTitleFontColor?: ColorValue;
69+
tabBarItemIconColor?: ColorValue;
70+
tabBarItemActiveIndicatorColor?: ColorValue;
71+
tabBarItemActiveIndicatorEnabled?: CT.WithDefault<boolean, true>;
72+
tabBarItemRippleColor?: ColorValue;
73+
tabBarItemBadgeTextColor?: ColorValue;
74+
tabBarItemBadgeBackgroundColor?: ColorValue;
75+
tabBarItemLabelVisibilityMode?: CT.WithDefault<
76+
TabBarItemLabelVisibilityMode,
77+
'auto'
78+
>;
79+
};
80+
81+
export type AppearanceAndroid = {
82+
normal?: ItemAppearanceAndroid;
83+
selected?: ItemAppearanceAndroid;
84+
focused?: ItemAppearanceAndroid;
85+
disabled?: ItemAppearanceAndroid;
86+
};
87+
5688
type BlurEffect =
5789
| 'none'
5890
| 'systemDefault'
@@ -134,8 +166,9 @@ export interface NativeProps extends ViewProps {
134166
// Android-specific image handling
135167
drawableIconResourceName?: string;
136168
imageIconResource?: ImageSource;
137-
tabBarItemBadgeTextColor?: ColorValue;
138-
tabBarItemBadgeBackgroundColor?: ColorValue;
169+
170+
// Android-specific
171+
standardAppearanceAndroid?: UnsafeMixed<AppearanceAndroid>;
139172

140173
// iOS-specific
141174
standardAppearance?: UnsafeMixed<Appearance>;

0 commit comments

Comments
 (0)