MCPcopy Create free account
hub / github.com/ajsmth/rn-tools / MyScreenWithHeader

Function MyScreenWithHeader

example/src/navigation-examples/header.tsx:16–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14}
15
16function MyScreenWithHeader() {
17 let [title, setTitle] = React.useState("");
18
19 return (
20 <Stack.Screen
21 header={
22 <Stack.Header
23 title={title}
24 backTitle="Custom back title"
25 backTitleFontSize={16}
26 hideBackButton={false}
27 >
28 <Stack.HeaderRight>
29 <Text>Custom right text!</Text>
30 </Stack.HeaderRight>
31 </Stack.Header>
32 }
33 >
34 <View
35 style={{
36 flex: 1,
37 alignItems: "center",
38 paddingVertical: 48,
39 }}
40 >
41 <TextInput
42 style={{ fontSize: 26, fontWeight: "semibold" }}
43 value={title}
44 onChangeText={setTitle}
45 placeholder="Enter header text"
46 />
47 </View>
48 </Stack.Screen>
49 );
50}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected