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

Commit ca741b6

Browse files
committed
fix: use opacity in headerStyle
1 parent 8fb0da5 commit ca741b6

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ Array [
383383
"height": 64,
384384
"maxHeight": undefined,
385385
"minHeight": undefined,
386+
"opacity": undefined,
386387
},
387388
]
388389
}
@@ -520,6 +521,7 @@ Array [
520521
"height": 64,
521522
"maxHeight": undefined,
522523
"minHeight": undefined,
524+
"opacity": undefined,
523525
},
524526
]
525527
}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ Array [
219219
},
220220
Object {
221221
"backgroundColor": "red",
222+
"opacity": 0.5,
222223
},
223224
]
224225
}
@@ -232,6 +233,7 @@ Array [
232233
"height": 64,
233234
"maxHeight": undefined,
234235
"minHeight": undefined,
236+
"opacity": 0.5,
235237
},
236238
]
237239
}
@@ -535,6 +537,7 @@ Array [
535537
},
536538
Object {
537539
"backgroundColor": "red",
540+
"opacity": 0.5,
538541
},
539542
]
540543
}
@@ -548,6 +551,7 @@ Array [
548551
"height": 64,
549552
"maxHeight": undefined,
550553
"minHeight": undefined,
554+
"opacity": 0.5,
551555
},
552556
]
553557
}

src/views/Header/HeaderSegment.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ export default class HeaderSegment extends React.Component<Props, State> {
217217
shadowOffset,
218218
shadowOpacity,
219219
shadowRadius,
220+
opacity,
220221
...unsafeStyles
221222
} = StyleSheet.flatten(customHeaderStyle || {}) as ViewStyle;
222223

@@ -257,6 +258,7 @@ export default class HeaderSegment extends React.Component<Props, State> {
257258
shadowOffset,
258259
shadowOpacity,
259260
shadowRadius,
261+
opacity,
260262
};
261263

262264
// Setting a property to undefined triggers default style
@@ -284,7 +286,7 @@ export default class HeaderSegment extends React.Component<Props, State> {
284286
</Animated.View>
285287
<Animated.View
286288
pointerEvents="box-none"
287-
style={[{ height, minHeight, maxHeight }]}
289+
style={[{ height, minHeight, maxHeight, opacity }]}
288290
>
289291
<View
290292
pointerEvents="none"

0 commit comments

Comments
 (0)