Add NoAnimation transition config

This commit is contained in:
Brent Vatne
2019-03-31 15:29:29 +02:00
parent cf2d6274df
commit ed5e7a82c2
2 changed files with 17 additions and 0 deletions

View File

@@ -205,10 +205,15 @@ function forFade(props) {
};
}
function forNoAnimation(props) {
return {};
}
export default {
forHorizontal,
forVertical,
forFadeFromBottomAndroid,
forFadeToBottomAndroid,
forFade,
forNoAnimation,
};

View File

@@ -63,6 +63,17 @@ const FadeOutToBottomAndroid = {
screenInterpolator: StyleInterpolator.forFadeToBottomAndroid,
};
const NoAnimation = {
transitionSpec: {
duration: 0,
timing: Animated.timing,
},
screenInterpolator: StyleInterpolator.forNoAnimation,
containerStyle: {
backgroundColor: '#eee',
},
};
function defaultTransitionConfig(
transitionProps,
prevTransitionProps,
@@ -114,4 +125,5 @@ export default {
ModalSlideFromBottomIOS,
FadeInFromBottomAndroid,
FadeOutToBottomAndroid,
NoAnimation,
};