From dbf165dbe7337d85ce45c68575a8eaa92ec572c0 Mon Sep 17 00:00:00 2001 From: Jose G Date: Wed, 20 Mar 2019 18:02:12 +0100 Subject: [PATCH] chore(typescript): export "TabBarIconProps" and "TabBarLabelProps" (#5712) --- CHANGELOG.md | 2 ++ typescript/react-navigation.d.ts | 23 ++++++++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d574855067..dae9230861 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +- Export TabBarIconProps and TabBarLabelProps + ## [3.5.1] - [2019-03-19](https://github.com/react-navigation/react-navigation/releases/tag/3.5.1) ## Added diff --git a/typescript/react-navigation.d.ts b/typescript/react-navigation.d.ts index fbfd42d550..4937087f59 100644 --- a/typescript/react-navigation.d.ts +++ b/typescript/react-navigation.d.ts @@ -560,23 +560,28 @@ declare module 'react-navigation' { index: number; tintColor?: string; } + + export interface TabBarIconProps { + tintColor: string | null; + focused: boolean; + horizontal: boolean; + } + + export interface TabBarLabelProps { + tintColor: string | null; + focused: boolean; + } + // tslint:disable-next-line:strict-export-declare-modifiers interface NavigationTabScreenOptionsBase { title?: string; tabBarIcon?: | React.ReactElement - | ((options: { - tintColor: string | null; - focused: boolean; - horizontal: boolean; - }) => React.ReactElement | null); + | ((options: TabBarIconProps) => React.ReactElement | null); tabBarLabel?: | string | React.ReactElement - | ((options: { - tintColor: string | null; - focused: boolean; - }) => React.ReactElement | string | null); + | ((options: TabBarLabelProps) => React.ReactElement | string | null); tabBarVisible?: boolean; tabBarTestIDProps?: { testID?: string; accessibilityLabel?: string }; }