Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3509677
D13175.id43696.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.id43696.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,66 @@
+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<>> = 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 +2051,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
Sun, Dec 22, 7:17 AM (6 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2690544
Default Alt Text
D13175.id43696.diff (3 KB)
Attached To
Mode
D13175: [native] Add renderTabBarItem to MaterialTopTabBarProps
Attached
Detach File
Event Timeline
Log In to Comment