@@ -24,8 +24,7 @@ const styles = StyleSheet.create({
2424 backgroundColor : 'transparent' ,
2525 justifyContent : 'center' ,
2626 } ,
27- blackOverlay : {
28- backgroundColor : 'black' ,
27+ overlay : {
2928 position : 'absolute' ,
3029 top : 0 ,
3130 right : 0 ,
@@ -106,9 +105,14 @@ class ImageHeaderScrollView extends Component {
106105 transform : [ { scale : headerScale } ] ,
107106 } ;
108107
108+ const overlayStyle = [
109+ styles . overlay ,
110+ { opacity : overlayOpacity , backgroundColor : this . props . overlayColor } ,
111+ ] ;
112+
109113 return (
110114 < Animated . View style = { [ styles . header , headerTransformStyle ] } >
111- < Animated . View style = { [ styles . blackOverlay , { opacity : overlayOpacity } ] } />
115+ < Animated . View style = { overlayStyle } />
112116 < View style = { styles . fixedForeground } >
113117 { this . props . renderFixedForeground ( this . state . scrollY ) }
114118 </ View >
@@ -183,6 +187,7 @@ class ImageHeaderScrollView extends Component {
183187ImageHeaderScrollView . propTypes = {
184188 children : React . PropTypes . node || React . PropTypes . nodes ,
185189 childrenStyle : View . propTypes . style ,
190+ overlayColor : React . PropTypes . string ,
186191 fadeOutForeground : React . PropTypes . bool ,
187192 foregroundParallaxRatio : React . PropTypes . number ,
188193 maxHeight : React . PropTypes . number ,
@@ -196,6 +201,7 @@ ImageHeaderScrollView.propTypes = {
196201} ;
197202
198203ImageHeaderScrollView . defaultProps = {
204+ overlayColor : 'black' ,
199205 fadeOutForeground : false ,
200206 foregroundParallaxRatio : 1 ,
201207 maxHeight : 125 ,
0 commit comments