add entering layoutAnimation

This commit is contained in:
Avinash Lingaloo
2022-04-29 13:26:37 +04:00
parent 36d7286acd
commit bb1156c3da
2 changed files with 14 additions and 2 deletions

View File

@@ -6,7 +6,15 @@ import {useIntl} from 'react-intl';
import {DeviceEventEmitter, Text, TouchableOpacity, useWindowDimensions, ViewStyle} from 'react-native';
import {Gesture, GestureDetector, GestureHandlerRootView} from 'react-native-gesture-handler';
import {Navigation} from 'react-native-navigation';
import Animated, {Extrapolation, interpolate, runOnJS, useAnimatedStyle, useSharedValue, withTiming} from 'react-native-reanimated';
import Animated, {
Extrapolation,
FadeIn,
interpolate,
runOnJS,
useAnimatedStyle,
useSharedValue,
withTiming,
} from 'react-native-reanimated';
import Toast, {TOAST_HEIGHT} from '@components/toast';
import {Navigation as NavigationConstants, Screens} from '@constants';
@@ -185,7 +193,10 @@ const SnackBar = ({barType, componentId, onUndoPress, sourceScreen}: SnackBarPro
return (
<GestureHandlerRootView style={{flex: 1, height: 80, width: '100%', position: 'absolute', bottom: 100}}>
<GestureDetector gesture={gesture}>
<Animated.View style={animatedMotion}>
<Animated.View
style={animatedMotion}
entering={FadeIn.duration(300)}
>
<Toast
animatedStyle={{opacity: 1, height: TOAST_HEIGHT}}
message={intl.formatMessage({id: config.id, defaultMessage: config.defaultMessage})}

1
package-lock.json generated
View File

@@ -5,6 +5,7 @@
"requires": true,
"packages": {
"": {
"name": "mattermost-mobile",
"version": "2.0.0",
"hasInstallScript": true,
"license": "Apache 2.0",