From 07c30b2847cce0abb4275d55a69e90a66e374bc9 Mon Sep 17 00:00:00 2001 From: Satyajit Sahoo Date: Mon, 15 Jun 2020 17:59:35 +0200 Subject: [PATCH] refactor: tweak types for bottom tab bar --- packages/bottom-tabs/src/types.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/bottom-tabs/src/types.tsx b/packages/bottom-tabs/src/types.tsx index ae089bb7..8b7aa0a2 100644 --- a/packages/bottom-tabs/src/types.tsx +++ b/packages/bottom-tabs/src/types.tsx @@ -119,7 +119,7 @@ export type BottomTabDescriptorMap = { [key: string]: BottomTabDescriptor; }; -export type BottomTabNavigationConfig = { +export type BottomTabNavigationConfig = { /** * Whether the screens should render the first time they are accessed. Defaults to `true`. * Set it to `false` if you want to render all screens on initial render. @@ -128,11 +128,11 @@ export type BottomTabNavigationConfig = { /** * Function that returns a React element to display as the tab bar. */ - tabBar?: (props: BottomTabBarProps) => React.ReactNode; + tabBar?: (props: BottomTabBarProps) => React.ReactNode; /** * Options for the tab bar which will be passed as props to the tab bar component. */ - tabBarOptions?: BottomTabBarOptions; + tabBarOptions?: T; }; export type BottomTabBarOptions = { @@ -201,7 +201,7 @@ export type BottomTabBarOptions = { style?: Animated.WithAnimatedValue>; }; -export type BottomTabBarProps = BottomTabBarOptions & { +export type BottomTabBarProps = T & { state: TabNavigationState; descriptors: BottomTabDescriptorMap; navigation: NavigationHelpers;