Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3503719
D13175.id43792.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D13175.id43792.diff
View Options
diff --git a/native/flow-typed/npm/@react-navigation/core_v6.x.x.js b/native/flow-typed/npm/@react-navigation/core_v6.x.x.js
--- a/native/flow-typed/npm/@react-navigation/core_v6.x.x.js
+++ b/native/flow-typed/npm/@react-navigation/core_v6.x.x.js
@@ -1978,11 +1978,67 @@
+descriptors: {| +[key: string]: MaterialTopTabDescriptor |},
|};
- declare export type MaterialTopTabBarProps = {|
+ declare export type TabDescriptor<T: Route<>> = {|
+ +accessibilityLabel?: string;
+ +accessible?: boolean;
+ +testID?: string;
+ +labelText?: string;
+ +labelAllowFontScaling?: boolean;
+ +href?: string;
+ +label?: (props: {
+ +route: T;
+ +labelText?: string;
+ +focused: boolean;
+ +color: string;
+ +allowFontScaling?: boolean;
+ +style?: TextStyleProp;
+ }) => React$Node;
+ +icon?: (props: {
+ +route: T;
+ +focused: boolean;
+ +color: string;
+ +size: number;
+ }) => React$Node;
+ +badge?: (props: { route: T }) => React$Node;
+ |};
+
+ declare export type OpaqueColorValue = Symbol & {|+__TYPE__: 'Color'|};
+ declare export type ColorValue = string | OpaqueColorValue;
+
+ declare export interface PressableAndroidRippleConfig {
+ +color?: ?ColorValue;
+ +borderless?: ?boolean;
+ +radius?: ?number;
+ +foreground?: ?boolean;
+ }
+
+
+ declare export type TabBarItemProps<T: Route<>> = $ReadOnly<{
+ ...TabDescriptor<T>,
+ +position: AnimatedInterpolation;
+ +route: T;
+ +navigationState: NavigationState;
+ +activeColor?: string;
+ +inactiveColor?: string;
+ +pressColor?: string;
+ +pressOpacity?: number;
+ +onLayout?: (event: LayoutEvent) => void;
+ +onPress: () => void;
+ +onLongPress: () => void;
+ +defaultTabWidth?: number;
+ +labelStyle?: TextStyleProp;
+ +style: ViewStyleProp;
+ +android_ripple?: PressableAndroidRippleConfig;
+ }>;
+
+ declare export type MaterialTopTabBarProps<T: Route<>> = {|
...MaterialTopTabNavigationBuilderResult,
+layout: {| +width: number, +height: number |},
+position: any, // Reanimated.Node<number>
+jumpTo: string => void,
+ +renderTabBarItem: (
+ props: $ReadOnly<{...TabBarItemProps<T>, key: string }>,
+ ) => React$Node,
|};
declare export type MaterialTopTabNavigationConfig = {|
@@ -1996,7 +2052,7 @@
+style?: ViewStyleProp,
+gestureHandlerProps?: PanGestureHandlerProps,
+pager?: MaterialTopTabPagerProps => React$Node,
- +tabBar?: MaterialTopTabBarProps => React$Node,
+ +tabBar?: MaterialTopTabBarProps<Route <>> => React$Node,
|};
declare export type ExtraMaterialTopTabNavigatorProps = {|
diff --git a/native/flow-typed/npm/@react-navigation/material-top-tabs_v6.x.x.js b/native/flow-typed/npm/@react-navigation/material-top-tabs_v6.x.x.js
--- a/native/flow-typed/npm/@react-navigation/material-top-tabs_v6.x.x.js
+++ b/native/flow-typed/npm/@react-navigation/material-top-tabs_v6.x.x.js
@@ -12,6 +12,7 @@
MaterialTopTabNavigationConfig,
MaterialTopTabNavigationBuilderResult,
MaterialTopTabBarProps,
+ Route,
} from '@react-navigation/core';
/**
@@ -42,7 +43,7 @@
*/
declare export var MaterialTopTabBar: React$ComponentType<
- MaterialTopTabBarProps,
+ MaterialTopTabBarProps<Route<>>,
>;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 6:14 AM (18 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2684161
Default Alt Text
D13175.id43792.diff (3 KB)
Attached To
Mode
D13175: [native] Add renderTabBarItem to MaterialTopTabBarProps
Attached
Detach File
Event Timeline
Log In to Comment