react-navigation-transitions
Advanced tools
Comparing version 1.0.10 to 1.0.11
{ | ||
"name": "react-navigation-transitions", | ||
"version": "1.0.10", | ||
"version": "1.0.11", | ||
"description": "Custom transitions for react-navigation", | ||
@@ -5,0 +5,0 @@ "author": "Phil Mok", |
@@ -132,2 +132,23 @@ import { Animated, Easing, Platform } from 'react-native'; | ||
export function fadeOut(duration = 300) { | ||
return { | ||
transitionSpec: { | ||
duration, | ||
easing: Easing.out(Easing.poly(4)), | ||
timing: Animated.timing, | ||
useNativeDriver: true, | ||
}, | ||
screenInterpolator: ({ position, scene }) => { | ||
const { index } = scene; | ||
const opacity = position.interpolate({ | ||
inputRange: [index - 1, index, index + 1], | ||
outputRange: [0, 1, 0] | ||
}); | ||
return { opacity }; | ||
}, | ||
}; | ||
} | ||
export function zoomIn(duration = 300) { | ||
@@ -134,0 +155,0 @@ return { |
10392
205