add exp eased slide aniamtions
This commit is contained in:
@@ -6,9 +6,10 @@ import {
|
|||||||
GestureHandlerRootView,
|
GestureHandlerRootView,
|
||||||
} from 'react-native-gesture-handler'
|
} from 'react-native-gesture-handler'
|
||||||
import Animated, {
|
import Animated, {
|
||||||
FadeIn,
|
Easing,
|
||||||
FadeOut,
|
|
||||||
runOnJS,
|
runOnJS,
|
||||||
|
SlideInUp,
|
||||||
|
SlideOutUp,
|
||||||
useAnimatedReaction,
|
useAnimatedReaction,
|
||||||
useAnimatedStyle,
|
useAnimatedStyle,
|
||||||
useSharedValue,
|
useSharedValue,
|
||||||
@@ -173,8 +174,12 @@ function AnimatedToast({
|
|||||||
pointerEvents="box-none">
|
pointerEvents="box-none">
|
||||||
{alive && (
|
{alive && (
|
||||||
<Animated.View
|
<Animated.View
|
||||||
entering={FadeIn.duration(TOAST_ANIMATION_DURATION)}
|
entering={SlideInUp.easing(Easing.out(Easing.exp)).duration(
|
||||||
exiting={FadeOut.duration(TOAST_ANIMATION_DURATION * 0.7)}
|
TOAST_ANIMATION_DURATION,
|
||||||
|
)}
|
||||||
|
exiting={SlideOutUp.easing(Easing.in(Easing.exp)).duration(
|
||||||
|
TOAST_ANIMATION_DURATION * 0.7,
|
||||||
|
)}
|
||||||
onLayout={evt => setCardHeight(evt.nativeEvent.layout.height)}
|
onLayout={evt => setCardHeight(evt.nativeEvent.layout.height)}
|
||||||
accessibilityRole="alert"
|
accessibilityRole="alert"
|
||||||
accessible={true}
|
accessible={true}
|
||||||
|
|||||||
Reference in New Issue
Block a user