@@ -53,13 +53,29 @@ Function which returns a React Element to display on the left side of the header
53
53
/ >
54
54
),
55
55
}}
56
- / > ;
56
+ / >
57
57
```
58
58
59
59
#### ` headerRight `
60
60
61
61
Function which returns a React Element to display on the right side of the header.
62
62
63
+ #### ` headerShadowVisible `
64
+
65
+ Whether to hide the elevation shadow (Android) or the bottom border (iOS) on the header.
66
+
67
+ This is a short-hand for the following styles:
68
+
69
+ ``` js
70
+ {
71
+ elevation: 0 ,
72
+ shadowOpacity: 0 ,
73
+ borderBottomWidth: 0 ,
74
+ }
75
+ ```
76
+
77
+ If the above styles are specified in ` headerStyle ` along with ` headerShadowVisible: false ` , then ` headerShadowVisible: false ` will take precedence.
78
+
63
79
#### ` headerStyle `
64
80
65
81
Style object for the header. You can specify a custom background color here, for example.
@@ -209,9 +225,7 @@ A component which aids in improving performance for inactive screens by utilizin
209
225
Usage:
210
226
211
227
``` js
212
- < ResourceSavingView visible= {0 }>
213
- {/* Content */ }
214
- < / ResourceSavingView>
228
+ < ResourceSavingView visible= {0 }> {/* Content */ }< / ResourceSavingView>
215
229
```
216
230
217
231
## Utilities
@@ -223,9 +237,7 @@ A wrapper over the `SafeAreaProvider` component from [`react-native-safe-area-co
223
237
Usage:
224
238
225
239
``` js
226
- < SafeAreaProviderCompat>
227
- {/* Your components */ }
228
- < / SafeAreaProviderCompat>
240
+ < SafeAreaProviderCompat> {/* Your components */ }< / SafeAreaProviderCompat>
229
241
```
230
242
231
243
### ` HeaderBackContext `
@@ -238,7 +250,7 @@ import { HeaderBackContext } from '@react-navigation/elements';
238
250
// ...
239
251
240
252
< HeaderBackContext .Consumer >
241
- {headerBack => {
253
+ {( headerBack ) => {
242
254
if (headerBack) {
243
255
const backTitle = headerBack .title ;
244
256
@@ -247,7 +259,7 @@ import { HeaderBackContext } from '@react-navigation/elements';
247
259
248
260
/* render something */
249
261
}}
250
- < / HeaderBackContext .Consumer >
262
+ < / HeaderBackContext .Consumer > ;
251
263
```
252
264
253
265
### ` HeaderShownContext `
@@ -260,10 +272,10 @@ import { HeaderShownContext } from '@react-navigation/elements';
260
272
// ...
261
273
262
274
< HeaderShownContext .Consumer >
263
- {headerShown => {
275
+ {( headerShown ) => {
264
276
/* render something */
265
277
}}
266
- < / HeaderShownContext .Consumer >
278
+ < / HeaderShownContext .Consumer > ;
267
279
```
268
280
269
281
### ` HeaderHeightContext `
@@ -276,10 +288,10 @@ import { HeaderHeightContext } from '@react-navigation/elements';
276
288
// ...
277
289
278
290
< HeaderHeightContext .Consumer >
279
- {headerHeight => {
291
+ {( headerHeight ) => {
280
292
/* render something */
281
293
}}
282
- < / HeaderHeightContext .Consumer >
294
+ < / HeaderHeightContext .Consumer > ;
283
295
```
284
296
285
297
### ` useHeaderHeight `
0 commit comments