monterosalondon / react-native-parallax-scroll

Parallax scroll view for react-native
MIT License
555 stars 63 forks source link

replace “renderEmptyView” with a configurable placeholder #24

Closed EyMaddis closed 6 years ago

EyMaddis commented 6 years ago

Allows fixes for #23

Allows for implementations like: apr-13-2018 13-07-35


          renderBackgroundPlaceholder={({ animatedValue }) => {
            return (
              <FancyHeader
                width={width}
                style={Styles.fancyHeader}
                contentStyle={Styles.fancyHeaderElements}
                rightElement={headerRight}
                leftElement={headerLeft}
                leftAnimatedOpacity={animatedValue.interpolate({
                  inputRange: [0, headerThreshold - 40],
                  outputRange: [1, 0],
                  extrapolate: 'clamp'
                })}
                maskColor={BaseColors.screenBackground}
              />
            )
          }}

I am not super happy with the description in the Readme, maybe a core contributor can clear things up.

z4o4z commented 6 years ago

Hi @EyMaddis, thanks again for great PR, you are doing really nice things!

z4o4z commented 6 years ago

This feature available in the 1.8.0 version!