From 72b17113979a5a2905cad123fee8349f3358a9bf Mon Sep 17 00:00:00 2001 From: Jeremi Stadler Date: Mon, 29 May 2017 11:34:18 +0200 Subject: [PATCH 1/2] [React-Navigation] Add TabBarTop & TabBarBottom types --- types/react-navigation/index.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/types/react-navigation/index.d.ts b/types/react-navigation/index.d.ts index ffa936f6d0..083139a165 100644 --- a/types/react-navigation/index.d.ts +++ b/types/react-navigation/index.d.ts @@ -621,3 +621,6 @@ export interface NavgationComponentProps { }, } } + +export const TabBarTop: React.ReactElement; +export const TabBarBottom: React.ReactElement; From f113c7a5e76e35076c93a808d96950146a6044b4 Mon Sep 17 00:00:00 2001 From: Jeremi Stadler Date: Mon, 29 May 2017 14:34:58 +0200 Subject: [PATCH 2/2] [React-Navigation] Add tabConfig tests Specifically to test the tabBarComponent property --- types/react-navigation/react-navigation-tests.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/types/react-navigation/react-navigation-tests.tsx b/types/react-navigation/react-navigation-tests.tsx index a88a5d3a0b..2493d92f84 100644 --- a/types/react-navigation/react-navigation-tests.tsx +++ b/types/react-navigation/react-navigation-tests.tsx @@ -3,7 +3,10 @@ import { View } from 'react-native'; import { addNavigationHelpers, StackNavigator, - TabNavigatorScreenOptions + TabNavigatorScreenOptions, + TabNavigatorConfig, + TabBarTop, + TabBarBottom, } from 'react-navigation'; const Start = ( @@ -34,5 +37,10 @@ const tabNavigatorScreenOptions: TabNavigatorScreenOptions = { title: 'title', tabBarVisible: true, tabBarIcon: , - tabBarLabel: 'label' + tabBarLabel: 'label', +} + +const tabNavigatorConfig: TabNavigatorConfig = { + lazy: true, + tabBarComponent: TabBarTop, }