Skip to content
This repository was archived by the owner on Feb 25, 2020. It is now read-only.

Commit 5cf9e7e

Browse files
committed
feat: add headerTransparent option
1 parent 572ab5c commit 5cf9e7e

File tree

8 files changed

+335
-288
lines changed

8 files changed

+335
-288
lines changed

example/src/WipeStack.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ export default createStackNavigator(
152152
{
153153
initialRouteName: 'List',
154154
headerMode: 'screen',
155+
defaultNavigationOptions: {
156+
cardOverlayEnabled: true,
157+
},
155158
...TransitionPresets.WipeFromBottomAndroid,
156159
}
157160
);

src/navigators/__tests__/__snapshots__/NestedNavigator.test.tsx.snap

Lines changed: 108 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -342,19 +342,12 @@ Array [
342342
onLayout={[Function]}
343343
pointerEvents="box-none"
344344
style={
345-
Array [
346-
Object {
347-
"bottom": 0,
348-
"left": 0,
349-
"position": "absolute",
350-
"right": 0,
351-
"top": 0,
352-
},
353-
Object {
354-
"height": 64,
355-
},
356-
undefined,
357-
]
345+
Object {
346+
"left": 0,
347+
"position": "absolute",
348+
"right": 0,
349+
"top": 0,
350+
}
358351
}
359352
>
360353
<View
@@ -388,58 +381,70 @@ Array [
388381
}
389382
/>
390383
</View>
391-
<View
392-
pointerEvents="none"
393-
style={
394-
Object {
395-
"height": 20,
396-
}
397-
}
398-
/>
399384
<View
400385
pointerEvents="box-none"
401386
style={
402-
Object {
403-
"alignItems": "center",
404-
"flex": 1,
405-
"flexDirection": "row",
406-
"justifyContent": "center",
407-
"paddingHorizontal": 4,
408-
}
387+
Array [
388+
Object {
389+
"height": 64,
390+
},
391+
undefined,
392+
]
409393
}
410394
>
411395
<View
396+
pointerEvents="none"
412397
style={
413-
Array [
414-
null,
415-
Object {},
416-
Object {
417-
"opacity": undefined,
418-
},
419-
undefined,
420-
]
398+
Object {
399+
"height": 20,
400+
}
401+
}
402+
/>
403+
<View
404+
pointerEvents="box-none"
405+
style={
406+
Object {
407+
"alignItems": "center",
408+
"flex": 1,
409+
"flexDirection": "row",
410+
"justifyContent": "center",
411+
"paddingHorizontal": 4,
412+
}
421413
}
422414
>
423-
<Text
424-
onLayout={[Function]}
415+
<View
425416
style={
426417
Array [
418+
null,
419+
Object {},
427420
Object {
428-
"color": "rgba(0, 0, 0, .9)",
429-
"fontSize": 17,
430-
"fontWeight": "600",
421+
"opacity": undefined,
431422
},
432-
Array [
433-
Object {
434-
"color": undefined,
435-
},
436-
undefined,
437-
],
423+
undefined,
438424
]
439425
}
440426
>
441-
Home
442-
</Text>
427+
<Text
428+
onLayout={[Function]}
429+
style={
430+
Array [
431+
Object {
432+
"color": "rgba(0, 0, 0, .9)",
433+
"fontSize": 17,
434+
"fontWeight": "600",
435+
},
436+
Array [
437+
Object {
438+
"color": undefined,
439+
},
440+
undefined,
441+
],
442+
]
443+
}
444+
>
445+
Home
446+
</Text>
447+
</View>
443448
</View>
444449
</View>
445450
</View>
@@ -473,19 +478,12 @@ Array [
473478
onLayout={[Function]}
474479
pointerEvents="box-none"
475480
style={
476-
Array [
477-
Object {
478-
"bottom": 0,
479-
"left": 0,
480-
"position": "absolute",
481-
"right": 0,
482-
"top": 0,
483-
},
484-
Object {
485-
"height": 64,
486-
},
487-
undefined,
488-
]
481+
Object {
482+
"left": 0,
483+
"position": "absolute",
484+
"right": 0,
485+
"top": 0,
486+
}
489487
}
490488
>
491489
<View
@@ -519,58 +517,70 @@ Array [
519517
}
520518
/>
521519
</View>
522-
<View
523-
pointerEvents="none"
524-
style={
525-
Object {
526-
"height": 20,
527-
}
528-
}
529-
/>
530520
<View
531521
pointerEvents="box-none"
532522
style={
533-
Object {
534-
"alignItems": "center",
535-
"flex": 1,
536-
"flexDirection": "row",
537-
"justifyContent": "center",
538-
"paddingHorizontal": 4,
539-
}
523+
Array [
524+
Object {
525+
"height": 64,
526+
},
527+
undefined,
528+
]
540529
}
541530
>
542531
<View
532+
pointerEvents="none"
543533
style={
544-
Array [
545-
null,
546-
Object {},
547-
Object {
548-
"opacity": undefined,
549-
},
550-
undefined,
551-
]
534+
Object {
535+
"height": 20,
536+
}
537+
}
538+
/>
539+
<View
540+
pointerEvents="box-none"
541+
style={
542+
Object {
543+
"alignItems": "center",
544+
"flex": 1,
545+
"flexDirection": "row",
546+
"justifyContent": "center",
547+
"paddingHorizontal": 4,
548+
}
552549
}
553550
>
554-
<Text
555-
onLayout={[Function]}
551+
<View
556552
style={
557553
Array [
554+
null,
555+
Object {},
558556
Object {
559-
"color": "rgba(0, 0, 0, .9)",
560-
"fontSize": 17,
561-
"fontWeight": "600",
557+
"opacity": undefined,
562558
},
563-
Array [
564-
Object {
565-
"color": undefined,
566-
},
567-
undefined,
568-
],
559+
undefined,
569560
]
570561
}
571562
>
572-
Sub
573-
</Text>
563+
<Text
564+
onLayout={[Function]}
565+
style={
566+
Array [
567+
Object {
568+
"color": "rgba(0, 0, 0, .9)",
569+
"fontSize": 17,
570+
"fontWeight": "600",
571+
},
572+
Array [
573+
Object {
574+
"color": undefined,
575+
},
576+
undefined,
577+
],
578+
]
579+
}
580+
>
581+
Sub
582+
</Text>
583+
</View>
574584
</View>
575585
</View>
576586
</View>

0 commit comments

Comments
 (0)