From 355583adc89d31928c0c0fc74cd3ea597d5426ff Mon Sep 17 00:00:00 2001 From: Jason Killian Date: Tue, 23 Oct 2018 14:57:56 -0400 Subject: [PATCH] add horizontal prop to tabBarIcon option --- types/react-navigation/index.d.ts | 5 +++-- types/react-navigation/react-navigation-tests.tsx | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/types/react-navigation/index.d.ts b/types/react-navigation/index.d.ts index 1bdf43bc35..1572c94e25 100644 --- a/types/react-navigation/index.d.ts +++ b/types/react-navigation/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-navigation 2.0 +// Type definitions for react-navigation 2.13 // Project: https://github.com/react-navigation/react-navigation // Definitions by: Huhuanming // mhcgrq @@ -25,6 +25,7 @@ // Denis Frezzato // Mickael Wegerich // Max Davidson +// Jason Killian // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -518,7 +519,7 @@ interface NavigationTabScreenOptionsBase { tabBarIcon?: | React.ReactElement | (( - options: { tintColor: string | null; focused: boolean } + options: { tintColor: string | null; focused: boolean; horizontal: boolean } ) => React.ReactElement | null); tabBarLabel?: | string diff --git a/types/react-navigation/react-navigation-tests.tsx b/types/react-navigation/react-navigation-tests.tsx index 47dd7baa0e..1b6bff2586 100644 --- a/types/react-navigation/react-navigation-tests.tsx +++ b/types/react-navigation/react-navigation-tests.tsx @@ -179,7 +179,8 @@ const tabNavigatorConfig: TabNavigatorConfig = { tabBarComponent: TabBarTop, tabBarOptions: { activeBackgroundColor: "blue" }, navigationOptions: () => ({ - tabBarOnPress: ({ scene, jumpToIndex }) => jumpToIndex(scene.index) + tabBarOnPress: ({ scene, jumpToIndex }) => jumpToIndex(scene.index), + tabBarIcon: ({ horizontal }) => , }) };