mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-05-09 17:04:43 +08:00
feat: add headerBackTitleVisible to navigation options in native stack
This commit is contained in:
committed by
Satyajit Sahoo
parent
5a34764404
commit
77f29d374f
@@ -65,6 +65,13 @@ export type NativeStackNavigationOptions = {
|
||||
* @platform ios
|
||||
*/
|
||||
headerBackTitle?: string;
|
||||
/**
|
||||
* Whether the back button title should be visible or not. Defaults to `true`.
|
||||
* Only supported on iOS.
|
||||
*
|
||||
* @platform ios
|
||||
*/
|
||||
headerBackTitleVisible?: boolean;
|
||||
/**
|
||||
* Whether to show the header.
|
||||
*/
|
||||
|
||||
@@ -20,6 +20,7 @@ export default function HeaderConfig(props: Props) {
|
||||
headerRight,
|
||||
headerTitle,
|
||||
headerBackTitle,
|
||||
headerBackTitleVisible = true,
|
||||
headerHideBackButton,
|
||||
headerHideShadow,
|
||||
headerTintColor,
|
||||
@@ -53,7 +54,7 @@ export default function HeaderConfig(props: Props) {
|
||||
? headerTitleStyle.color
|
||||
: headerTintColor
|
||||
}
|
||||
backTitle={headerBackTitle}
|
||||
backTitle={headerBackTitleVisible ? headerBackTitle : ''}
|
||||
backTitleFontFamily={headerBackTitleStyle.fontFamily}
|
||||
backTitleFontSize={headerBackTitleStyle.fontSize}
|
||||
color={headerTintColor}
|
||||
|
||||
Reference in New Issue
Block a user