From 12270d1182a4b7bd2b37b7573ac1fff25827e57d Mon Sep 17 00:00:00 2001 From: Maciej Stosio Date: Wed, 26 Mar 2025 14:59:32 +0100 Subject: [PATCH 1/2] chore: Update docs about headerBackButtonDisplayMode and headerBackTitle --- .../version-7.x/native-stack-navigator.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/versioned_docs/version-7.x/native-stack-navigator.md b/versioned_docs/version-7.x/native-stack-navigator.md index 23e615653f..d8997bbfcd 100755 --- a/versioned_docs/version-7.x/native-stack-navigator.md +++ b/versioned_docs/version-7.x/native-stack-navigator.md @@ -174,7 +174,9 @@ This will have no effect on the first screen in the stack. #### `headerBackTitle` -Title string used by the back button on iOS. Defaults to the previous scene's title, or "Back" if there's not enough space. Use `headerBackButtonDisplayMode` to customize the behavior. +Title string used by the back button on iOS. Defaults to the previous scene's title. + +Use `headerBackButtonDisplayMode: "minimal"` to hide it. Only supported on iOS. @@ -185,10 +187,17 @@ Only supported on iOS. How the back button displays icon and title. Supported values: +- "default" - Displays one of the following depending on the available space: previous screen's title, generic title (e.g. 'Back') or no title (only icon). +- "generic" – Displays one of the following depending on the available space: generic title (e.g. 'Back') or no title (only icon). +- "minimal" – Always displays only the icon without a title. + +The space-aware behavior is disabled when: +- The iOS version is 13 or lower +- Custom back title is set (e.g. with `headerBackTitle`) +- Custom font family or size is set (e.g. with `headerBackTitleStyle`) +- Back button menu is disabled (e.g. with `headerBackButtonMenuEnabled`) -- `default`: Displays one of the following depending on the available space: previous screen's title, generic title (e.g. 'Back') or no title (only icon). -- `generic`: Displays one of the following depending on the available space: generic title (e.g. 'Back') or no title (only icon). iOS >= 14 only, falls back to "default" on older iOS versions. -- `minimal`: Always displays only the icon without a title. +In such cases, a static title and icon are always displayed. Only supported on iOS. From 84814e56b5eaa693bf26c97c32a035763199e959 Mon Sep 17 00:00:00 2001 From: Maciej Stosio Date: Wed, 26 Mar 2025 15:08:53 +0100 Subject: [PATCH 2/2] fix: fix lint --- versioned_docs/version-7.x/native-stack-navigator.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/versioned_docs/version-7.x/native-stack-navigator.md b/versioned_docs/version-7.x/native-stack-navigator.md index d8997bbfcd..8ec238a587 100755 --- a/versioned_docs/version-7.x/native-stack-navigator.md +++ b/versioned_docs/version-7.x/native-stack-navigator.md @@ -187,11 +187,13 @@ Only supported on iOS. How the back button displays icon and title. Supported values: + - "default" - Displays one of the following depending on the available space: previous screen's title, generic title (e.g. 'Back') or no title (only icon). - "generic" – Displays one of the following depending on the available space: generic title (e.g. 'Back') or no title (only icon). - "minimal" – Always displays only the icon without a title. The space-aware behavior is disabled when: + - The iOS version is 13 or lower - Custom back title is set (e.g. with `headerBackTitle`) - Custom font family or size is set (e.g. with `headerBackTitleStyle`)