@@ -24,8 +24,7 @@ const styles = StyleSheet.create({
24
24
backgroundColor : 'transparent' ,
25
25
justifyContent : 'center' ,
26
26
} ,
27
- blackOverlay : {
28
- backgroundColor : 'black' ,
27
+ overlay : {
29
28
position : 'absolute' ,
30
29
top : 0 ,
31
30
right : 0 ,
@@ -106,9 +105,14 @@ class ImageHeaderScrollView extends Component {
106
105
transform : [ { scale : headerScale } ] ,
107
106
} ;
108
107
108
+ const overlayStyle = [
109
+ styles . overlay ,
110
+ { opacity : overlayOpacity , backgroundColor : this . props . overlayColor } ,
111
+ ] ;
112
+
109
113
return (
110
114
< Animated . View style = { [ styles . header , headerTransformStyle ] } >
111
- < Animated . View style = { [ styles . blackOverlay , { opacity : overlayOpacity } ] } />
115
+ < Animated . View style = { overlayStyle } />
112
116
< View style = { styles . fixedForeground } >
113
117
{ this . props . renderFixedForeground ( this . state . scrollY ) }
114
118
</ View >
@@ -183,6 +187,7 @@ class ImageHeaderScrollView extends Component {
183
187
ImageHeaderScrollView . propTypes = {
184
188
children : React . PropTypes . node || React . PropTypes . nodes ,
185
189
childrenStyle : View . propTypes . style ,
190
+ overlayColor : React . PropTypes . string ,
186
191
fadeOutForeground : React . PropTypes . bool ,
187
192
foregroundParallaxRatio : React . PropTypes . number ,
188
193
maxHeight : React . PropTypes . number ,
@@ -196,6 +201,7 @@ ImageHeaderScrollView.propTypes = {
196
201
} ;
197
202
198
203
ImageHeaderScrollView . defaultProps = {
204
+ overlayColor : 'black' ,
199
205
fadeOutForeground : false ,
200
206
foregroundParallaxRatio : 1 ,
201
207
maxHeight : 125 ,
0 commit comments