Skip to content

Commit dbf165d

Browse files
itsjgfbrentvatne
authored andcommitted
chore(typescript): export "TabBarIconProps" and "TabBarLabelProps" (react-navigation#5712)
1 parent bd09153 commit dbf165d

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
- Export TabBarIconProps and TabBarLabelProps
11+
1012
## [3.5.1] - [2019-03-19](https://github.com/react-navigation/react-navigation/releases/tag/3.5.1)
1113

1214
## Added

typescript/react-navigation.d.ts

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -560,23 +560,28 @@ declare module 'react-navigation' {
560560
index: number;
561561
tintColor?: string;
562562
}
563+
564+
export interface TabBarIconProps {
565+
tintColor: string | null;
566+
focused: boolean;
567+
horizontal: boolean;
568+
}
569+
570+
export interface TabBarLabelProps {
571+
tintColor: string | null;
572+
focused: boolean;
573+
}
574+
563575
// tslint:disable-next-line:strict-export-declare-modifiers
564576
interface NavigationTabScreenOptionsBase {
565577
title?: string;
566578
tabBarIcon?:
567579
| React.ReactElement<any>
568-
| ((options: {
569-
tintColor: string | null;
570-
focused: boolean;
571-
horizontal: boolean;
572-
}) => React.ReactElement<any> | null);
580+
| ((options: TabBarIconProps) => React.ReactElement<any> | null);
573581
tabBarLabel?:
574582
| string
575583
| React.ReactElement<any>
576-
| ((options: {
577-
tintColor: string | null;
578-
focused: boolean;
579-
}) => React.ReactElement<any> | string | null);
584+
| ((options: TabBarLabelProps) => React.ReactElement<any> | string | null);
580585
tabBarVisible?: boolean;
581586
tabBarTestIDProps?: { testID?: string; accessibilityLabel?: string };
582587
}

0 commit comments

Comments
 (0)