Add a config to override the truncated back title (#1137)

Fixes #1136.
This commit is contained in:
Ville Immonen 2017-04-22 09:26:31 +03:00 committed by Mike Grabowski
parent 046acd2b5e
commit c384e3371c
3 changed files with 6 additions and 0 deletions

View File

@ -107,6 +107,10 @@ String or React Element used by the header. Defaults to scene `title`
Title string used by the back button on iOS or `null` to disable label. Defaults to scene `title`
#### `headerTruncatedBackTitle`
Title string used by the back button when `headerBackTitle` doesn't fit on the screen. `"Back"` by default.
#### `headerRight`
String or React Element to display on the right side of the header

View File

@ -201,6 +201,7 @@ export type NavigationStackScreenOptions = NavigationScreenOptions & {
headerTintColor?: string,
headerLeft?: React.Element<*>,
headerBackTitle?: string,
headerTruncatedBackTitle?: string,
headerPressColorAndroid?: string,
headerRight?: React.Element<*>,
headerStyle?: Style,

View File

@ -123,6 +123,7 @@ class Header extends React.PureComponent<void, HeaderProps, HeaderState> {
pressColorAndroid={options.headerPressColorAndroid}
tintColor={options.headerTintColor}
title={backButtonTitle}
truncatedTitle={options.headerTruncatedBackTitle}
width={width}
/>
);