Open noelzappy opened 3 years ago
let fall = new Animated.Value(1)
const animatedHeaderContentOpacity = Animated.interpolate(fall, {
inputRange: [0.75, 1],
outputRange: [0, 1],
extrapolate: Animated.Extrapolate.CLAMP,
})
const renderShadow = () => {
// `react-native-reanimated` v2: Animated.interpolateNode
const animatedShadowOpacity = Animated.interpolate(fall, {
inputRange: [0, 1],
outputRange: [0.5, 0],
})
return (
<AnimatedView
pointerEvents="none"
style={[
styles.shadowContainer,
{
opacity: animatedShadowOpacity,
},
]}
/>
)
}
<BottomSheet
...
callbackNode={fall}
...
/>
{renderShadow()}
thanks needed an overlay as well!
Is it possible to add a transparent overlay to the screen when the Bottom Sheet is open to a particular snap point?