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

Commit 04421cd

Browse files
arnsasatya164
authored andcommitted
fix: use a shadow instead of a border for header on iOS
closes #97
1 parent ee241aa commit 04421cd

File tree

3 files changed

+35
-10
lines changed

3 files changed

+35
-10
lines changed

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

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,14 @@ Array [
357357
Array [
358358
Object {
359359
"backgroundColor": "white",
360-
"borderBottomColor": "#A7A7AA",
361-
"borderBottomWidth": 0.5,
362360
"flex": 1,
361+
"shadowColor": "rgba(0, 0, 0, 0.3)",
362+
"shadowOffset": Object {
363+
"height": 0.5,
364+
"width": 0,
365+
},
366+
"shadowOpacity": 0.85,
367+
"shadowRadius": 0,
363368
},
364369
Object {},
365370
]
@@ -491,9 +496,14 @@ Array [
491496
Array [
492497
Object {
493498
"backgroundColor": "white",
494-
"borderBottomColor": "#A7A7AA",
495-
"borderBottomWidth": 0.5,
496499
"flex": 1,
500+
"shadowColor": "rgba(0, 0, 0, 0.3)",
501+
"shadowOffset": Object {
502+
"height": 0.5,
503+
"width": 0,
504+
},
505+
"shadowOpacity": 0.85,
506+
"shadowRadius": 0,
497507
},
498508
Object {},
499509
]

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

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,14 @@ Array [
206206
Array [
207207
Object {
208208
"backgroundColor": "white",
209-
"borderBottomColor": "#A7A7AA",
210-
"borderBottomWidth": 0.5,
211209
"flex": 1,
210+
"shadowColor": "rgba(0, 0, 0, 0.3)",
211+
"shadowOffset": Object {
212+
"height": 0.5,
213+
"width": 0,
214+
},
215+
"shadowOpacity": 0.85,
216+
"shadowRadius": 0,
212217
},
213218
Object {
214219
"backgroundColor": "red",
@@ -519,9 +524,14 @@ Array [
519524
Array [
520525
Object {
521526
"backgroundColor": "white",
522-
"borderBottomColor": "#A7A7AA",
523-
"borderBottomWidth": 0.5,
524527
"flex": 1,
528+
"shadowColor": "rgba(0, 0, 0, 0.3)",
529+
"shadowOffset": Object {
530+
"height": 0.5,
531+
"width": 0,
532+
},
533+
"shadowOpacity": 0.85,
534+
"shadowRadius": 0,
525535
},
526536
Object {
527537
"backgroundColor": "red",

src/views/Header/HeaderBackground.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,13 @@ const styles = StyleSheet.create({
1414
elevation: 4,
1515
},
1616
ios: {
17-
borderBottomWidth: StyleSheet.hairlineWidth,
18-
borderBottomColor: '#A7A7AA',
17+
shadowColor: 'rgba(0, 0, 0, 0.3)',
18+
shadowOpacity: 0.85,
19+
shadowRadius: 0,
20+
shadowOffset: {
21+
width: 0,
22+
height: StyleSheet.hairlineWidth,
23+
},
1924
},
2025
default: {
2126
// https://github.com/necolas/react-native-web/issues/44

0 commit comments

Comments
 (0)