Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Scrollview background color set using param : scrollViewBackgroundColor
  • Loading branch information
[email protected] committed Nov 29, 2019
commit ce32b51c8a5a5c5ea3d1afd3529236c6f991409a
8 changes: 5 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ const IPropTypes = {
outputScaleValue: number,
resetScroll: bool,
resetScrollSuccessfull: func,
navBarOverlapHeight: number
navBarOverlapHeight: number,
scrollViewBackgroundColor: string,
}

class ParallaxScrollView extends Component {
Expand Down Expand Up @@ -138,7 +139,7 @@ class ParallaxScrollView extends Component {
scrollElement,
{
ref: SCROLLVIEW_REF,
style: [styles.scrollView, scrollElement.props.style],
style: [{backgroundColor: scrollViewBackgroundColor}, scrollElement.props.style],
scrollEventThrottle: 1,
// Using Native Driver greatly optimizes performance
onScroll: Animated.event(
Expand Down Expand Up @@ -449,7 +450,8 @@ ParallaxScrollView.defaultProps = {
outputScaleValue: 5,
resetScroll: false,
resetScrollSuccessfull: () => {},
navBarOverlapHeight: 0
navBarOverlapHeight: 0,
scrollViewBackgroundColor: 'transparent'
}

module.exports = ParallaxScrollView