diff --git a/versioned_docs/version-7.x/header-buttons.md b/versioned_docs/version-7.x/header-buttons.md index 11cb7c8c41d..b670e891082 100755 --- a/versioned_docs/version-7.x/header-buttons.md +++ b/versioned_docs/version-7.x/header-buttons.md @@ -16,32 +16,64 @@ The most common way to interact with a header is by tapping on a button either t -```js -const MyStack = createStackNavigator({ +```js name="Header button" snack version=7 +import * as React from 'react'; +import { Text, View, Button } from 'react-native'; +import { createStaticNavigation } from '@react-navigation/native'; +import { createNativeStackNavigator } from '@react-navigation/native-stack'; + +function HomeScreen() { + return ( + + Home Screen + + ); +} + +// codeblock-focus-start +const MyStack = createNativeStackNavigator({ screens: { Home: { screen: HomeScreen, options: { - headerTitle: (props) => , + // highlight-start headerRight: () => ( -