parent
b26c57abe0
commit
b29d6a7d57
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,30 +0,0 @@
|
|||||||
import { Dimensions, Animated } from 'react-native';
|
|
||||||
|
|
||||||
export const animation = new Animated.Value(0);
|
|
||||||
|
|
||||||
export const startAnimation = () => {
|
|
||||||
Animated.timing(animation, {
|
|
||||||
toValue: 1,
|
|
||||||
duration: 400,
|
|
||||||
useNativeDriver: true,
|
|
||||||
}).start();
|
|
||||||
};
|
|
||||||
|
|
||||||
export const stopAnimation = () => {
|
|
||||||
Animated.timing(animation, {
|
|
||||||
toValue: 0,
|
|
||||||
duration: 400,
|
|
||||||
useNativeDriver: true,
|
|
||||||
}).start();
|
|
||||||
};
|
|
||||||
|
|
||||||
export const animatedStyles = {
|
|
||||||
transform: [
|
|
||||||
{
|
|
||||||
translateY: animation.interpolate({
|
|
||||||
inputRange: [0, 1],
|
|
||||||
outputRange: [0, -Dimensions.get('window').height/2]
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
Loading…
Reference in new issue