Skip to content

Commit baeb118

Browse files
committed
chore(docs): Added screenshots to headerLeft and headerRight option
1 parent 1b3439e commit baeb118

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed
25.8 KB
Loading
41.7 KB
Loading

versioned_docs/version-7.x/native-stack-navigator.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ Only supported on iOS.
334334

335335
Function which returns a React Element to render as the background of the header. This is useful for using backgrounds such as an image or a gradient.
336336

337-
<img src="/assets/7.x/native-stack/headerBackground.png" width="500" alt="Header background" />
337+
<img src="/assets/7.x/native-stack/headerBackground.png" width="500" alt="Header background"/>
338338

339339
Example:
340340

@@ -359,10 +359,32 @@ Tint color for the header. Changes the color of back button and title.
359359

360360
Function which returns a React Element to display on the left side of the header. This replaces the back button. See `headerBackVisible` to show the back button along side left element.
361361

362+
<img src="/assets/7.x/native-stack/headerLeft.png" width="500" alt="Header right"/>
363+
364+
Example:
365+
366+
```js
367+
headerLeft: () => (
368+
<MaterialCommunityIcons name="map" color="gray" size={36} />
369+
),
370+
headerBackVisible: true,
371+
headerBackTitle: 'Back',
372+
```
373+
362374
#### `headerRight`
363375

364376
Function which returns a React Element to display on the right side of the header.
365377

378+
<img src="/assets/7.x/native-stack/headerRight.png" width="500" alt="Header right"/>
379+
380+
Example:
381+
382+
```js
383+
headerRight: () => (
384+
<MaterialCommunityIcons name="map" color="blue" size={36} />
385+
)
386+
```
387+
366388
#### `headerTitle`
367389

368390
String or a function that returns a React Element to be used by the header. Defaults to `title` or name of the screen.

0 commit comments

Comments
 (0)