From b9f50bd012d22f9ea9a27a8519286b2d81191d79 Mon Sep 17 00:00:00 2001 From: Jose G Date: Thu, 21 Mar 2019 03:28:36 +0100 Subject: [PATCH] =?UTF-8?q?[TypeScript]=C2=A0Export=20DrawerIconProps=20an?= =?UTF-8?q?d=20DrawerLabelProps=20(#5715)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(typescript): export DrawerIconProps and DrawerLabelProps * chore: update changelog --- CHANGELOG.md | 2 +- typescript/react-navigation.d.ts | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dae9230861..64cbb6e717 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] -- Export TabBarIconProps and TabBarLabelProps +- Export TabBarIconProps, TabBarLabelProps, DrawerIconProps and DrawerLabelProps. ## [3.5.1] - [2019-03-19](https://github.com/react-navigation/react-navigation/releases/tag/3.5.1) diff --git a/typescript/react-navigation.d.ts b/typescript/react-navigation.d.ts index 4937087f59..41f6e98e0b 100644 --- a/typescript/react-navigation.d.ts +++ b/typescript/react-navigation.d.ts @@ -613,21 +613,25 @@ declare module 'react-navigation' { export type DrawerLockMode = 'unlocked' | 'locked-closed' | 'locked-open'; + export interface DrawerIconProps { + tintColor: string | null; + focused: boolean; + } + + export interface DrawerLabelProps { + tintColor: string | null; + focused: boolean; + } + export interface NavigationDrawerScreenOptions { title?: string; drawerIcon?: | React.ReactElement - | ((options: { - tintColor: string | null; - focused: boolean; - }) => React.ReactElement | null); + | ((options: DrawerIconProps) => React.ReactElement | null); drawerLabel?: | string | React.ReactElement - | ((options: { - tintColor: string | null; - focused: boolean; - }) => React.ReactElement | null); + | ((options: DrawerLabelProps) => React.ReactElement | null); drawerLockMode?: DrawerLockMode; }