Skip to content

Commit 2fef6a2

Browse files
Update upgrading-from-6.x.md
1 parent 01dece4 commit 2fef6a2

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

versioned_docs/version-7.x/upgrading-from-6.x.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,26 @@ If you're using Drawer Navigator on the Web, it'll now use CSS transitions inste
372372

373373
See [Drawer Navigator](drawer-navigator.md) for usage.
374374

375+
### Changes to elements
376+
377+
#### `labelVisible` is removed in favor of `displayMode` in `headerLeft` and `HeaderBackButton` elements
378+
379+
Previously, `labelVisible` could be used to control whether the back button title is shown in the header. It's now removed in favor of `displayMode` which provides more flexibility.
380+
381+
The new possible values are:
382+
- `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).
383+
- `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.
384+
- `minimal`: Always displays only the icon without a title.
385+
386+
The previous behavior can be achieved by setting `displayMode` to `default` or `generic` for showing and `minimal` for hiding the back button title respectively:
387+
388+
```diff lang=js
389+
<HeaderBackButton
390+
- labelVisible={false}
391+
+ displayMode="minimal"
392+
/>
393+
```
394+
375395
### Deprecations and removals
376396

377397
#### Material Bottom Tab Navigator now lives in `react-native-paper` package

0 commit comments

Comments
 (0)