From eb868d6677d76e3f370420c3e668fc86adfda3d6 Mon Sep 17 00:00:00 2001 From: Jinesh Shah Date: Thu, 5 Jul 2018 13:14:11 -0400 Subject: [PATCH] Fixed headerLeft and headerRight props (#26881) * Update index.d.ts Fixed headerLeft and headerRight types * Update index.d.ts --- types/react-navigation/index.d.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/types/react-navigation/index.d.ts b/types/react-navigation/index.d.ts index b58f3778ae..02dc72d98f 100644 --- a/types/react-navigation/index.d.ts +++ b/types/react-navigation/index.d.ts @@ -395,22 +395,24 @@ export interface NavigationSwitchRouterConfig { export interface NavigationStackScreenOptions { title?: string; header?: - | ( - | React.ReactElement - | ((headerProps: HeaderProps) => React.ReactElement)) + | React.ReactElement + | ((headerProps: HeaderProps) => React.ReactElement) | null; headerTransparent?: boolean; headerTitle?: string | React.ReactElement; headerTitleStyle?: StyleProp; headerTitleAllowFontScaling?: boolean; headerTintColor?: string; - headerLeft?: React.ReactElement; + headerLeft?: + | React.ReactElement + | ((backButtonProps: HeaderBackButtonProps) => React.ReactElement) + | null; headerBackTitle?: string | null; headerBackImage?: React.ReactElement; headerTruncatedBackTitle?: string; headerBackTitleStyle?: StyleProp; headerPressColorAndroid?: string; - headerRight?: React.ReactElement; + headerRight?: React.ReactElement | null; headerStyle?: StyleProp; headerForceInset?: HeaderForceInset; headerBackground?: React.ReactNode | React.ReactType;