Socket
Socket
Sign inDemoInstall

react-navigation-transitions

Package Overview
Dependencies
0
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name": "react-navigation-transitions",
"version": "1.0.2",
"version": "1.0.3",
"description": "Custom transitions for react-navigation",

@@ -5,0 +5,0 @@ "author": "Phil Mok",

@@ -19,2 +19,7 @@ # react-navigation-transitions

`flipY`
`flipX`
More will be added in future versions.

@@ -39,3 +44,3 @@

initialRouteName: 'ScreenA',
transitionConfig: fromLeft,
transitionConfig: () => fromLeft(),
},

@@ -42,0 +47,0 @@ );

@@ -119,1 +119,43 @@ import { Animated, Easing } from 'react-native';

}
export function flipY(duration = 300) {
return {
transitionSpec: {
duration,
easing: Easing.out(Easing.poly(4)),
timing: Animated.timing,
useNativeDriver: true,
},
screenInterpolator: ({ position, scene }) => {
const { index } = scene;
const rotateY = position.interpolate({
inputRange: [index - 1, index],
outputRange: ['180deg', '0deg'],
});
return { transform: [{ rotateY }], backfaceVisibility: 'hidden' };
},
};
}
export function flipX(duration = 300) {
return {
transitionSpec: {
duration,
easing: Easing.out(Easing.poly(4)),
timing: Animated.timing,
useNativeDriver: true,
},
screenInterpolator: ({ position, scene }) => {
const { index } = scene;
const rotateX = position.interpolate({
inputRange: [index - 1, index],
outputRange: ['180deg', '0deg'],
});
return { transform: [{ rotateX }], backfaceVisibility: 'hidden' };
},
};
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc