Skip to content

Commit 251d152

Browse files
committed
docs: Updated photos for fundamentals - header buttons
1 parent 4c24241 commit 251d152

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed
Loading
38.8 KB
Loading
Binary file not shown.

versioned_docs/version-6.x/header-buttons.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function StackScreen() {
3535
}
3636
```
3737

38-
![Header button](/assets/headers/header-button.png)
38+
<img src="/assets/7.x/fundamentals/buttonInHeader.png" width="500" alt="Button right in the header" />
3939

4040
When we define our button this way, the `this` variable in `options` is _not_ the `HomeScreen` instance, so you can't call `setState` or any instance methods on it. This is pretty important because it's extremely common to want the buttons in your header to interact with the screen that the header belongs to. So, we will look how to do this next.
4141

@@ -82,7 +82,7 @@ function HomeScreen({ navigation }) {
8282
```
8383

8484
<video playsInline autoPlay muted loop>
85-
<source src="/assets/headers/header-update-screen.mp4" />
85+
<source src="/assets/7.x/fundamentals/updateHeader.mp4" />
8686
</video>
8787

8888
Here we update the `headerRight` with a button with `onPress` handler that has access to the component's state and can update it.
@@ -109,7 +109,7 @@ To customize the back button image, you can use `headerBackImageSource` ([read m
109109
</Stack.Navigator>
110110
```
111111

112-
![Header custom back](/assets/headers/header-back-custom.png)
112+
<img src="/assets/7.x/fundamentals/customBack.png" width="500" alt="Custom back button" />
113113

114114
## Overriding the back button
115115

versioned_docs/version-7.x/header-buttons.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export default function App() {
107107
</TabItem>
108108
</Tabs>
109109

110-
![Header button](/assets/headers/header-button.png)
110+
<img src="/assets/7.x/fundamentals/buttonInHeader.png" width="500" alt="Button right in the header" />
111111

112112
When we define our button this way, the `this` variable in `options` is _not_ the `HomeScreen` instance, so you can't call `setState` or any instance methods on it. This is pretty important because it's common to want the buttons in your header to interact with the screen that the header belongs to. So, we will look how to do this next.
113113

@@ -236,8 +236,8 @@ export default function App() {
236236
</TabItem>
237237
</Tabs>
238238

239-
<video playsInline autoPlay muted loop >
240-
<source src="/assets/headers/header-update-screen.mp4" />
239+
<video playsInline autoPlay muted loop>
240+
<source src="/assets/7.x/fundamentals/updateHeader.mp4" />
241241
</video>
242242

243243
Here we update the `headerRight` with a button with `onPress` handler that has access to the component's state and can update it.
@@ -287,7 +287,7 @@ const MyStack = createNativeStackNavigator({
287287
</TabItem>
288288
</Tabs>
289289

290-
![Header custom back](/assets/headers/header-back-custom.png)
290+
<img src="/assets/7.x/fundamentals/customBack.png" width="500" alt="Custom back button" />
291291

292292
## Overriding the back button
293293

0 commit comments

Comments
 (0)