Skip to content

Commit b9f50bd

Browse files
itsjgfbrentvatne
authored andcommitted
[TypeScript] Export DrawerIconProps and DrawerLabelProps (react-navigation#5715)
* chore(typescript): export DrawerIconProps and DrawerLabelProps * chore: update changelog
1 parent dbf165d commit b9f50bd

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10-
- Export TabBarIconProps and TabBarLabelProps
10+
- Export TabBarIconProps, TabBarLabelProps, DrawerIconProps and DrawerLabelProps.
1111

1212
## [3.5.1] - [2019-03-19](https://github.com/react-navigation/react-navigation/releases/tag/3.5.1)
1313

typescript/react-navigation.d.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -613,21 +613,25 @@ declare module 'react-navigation' {
613613

614614
export type DrawerLockMode = 'unlocked' | 'locked-closed' | 'locked-open';
615615

616+
export interface DrawerIconProps {
617+
tintColor: string | null;
618+
focused: boolean;
619+
}
620+
621+
export interface DrawerLabelProps {
622+
tintColor: string | null;
623+
focused: boolean;
624+
}
625+
616626
export interface NavigationDrawerScreenOptions {
617627
title?: string;
618628
drawerIcon?:
619629
| React.ReactElement<any>
620-
| ((options: {
621-
tintColor: string | null;
622-
focused: boolean;
623-
}) => React.ReactElement<any> | null);
630+
| ((options: DrawerIconProps) => React.ReactElement<any> | null);
624631
drawerLabel?:
625632
| string
626633
| React.ReactElement<any>
627-
| ((options: {
628-
tintColor: string | null;
629-
focused: boolean;
630-
}) => React.ReactElement<any> | null);
634+
| ((options: DrawerLabelProps) => React.ReactElement<any> | null);
631635
drawerLockMode?: DrawerLockMode;
632636
}
633637

0 commit comments

Comments
 (0)