Skip to content

Commit baa4f21

Browse files
committed
fix: bring back entering and exiting animations properly
1 parent 70d28b4 commit baa4f21

File tree

1 file changed

+11
-3
lines changed
  • package/src/components/MessageInput/components/InputButtons

1 file changed

+11
-3
lines changed

package/src/components/MessageInput/components/InputButtons/index.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
import React, { useEffect } from 'react';
22
import { StyleSheet } from 'react-native';
33

4-
import Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
4+
import Animated, {
5+
useAnimatedStyle,
6+
useSharedValue,
7+
withTiming,
8+
ZoomIn,
9+
ZoomOut,
10+
} from 'react-native-reanimated';
511

612
import { OwnCapabilitiesContextValue } from '../../../../contexts';
713
import {
@@ -54,8 +60,10 @@ export const InputButtonsWithContext = (props: InputButtonsWithContextProps) =>
5460
}
5561

5662
return hasAttachmentUploadCapabilities ? (
57-
<Animated.View style={[styles.attachButtonContainer, attachButtonContainer, animatedStyle]}>
58-
<AttachButton />
63+
<Animated.View entering={ZoomIn.duration(200)} exiting={ZoomOut.duration(200)}>
64+
<Animated.View style={[styles.attachButtonContainer, attachButtonContainer, animatedStyle]}>
65+
<AttachButton />
66+
</Animated.View>
5967
</Animated.View>
6068
) : null;
6169
};

0 commit comments

Comments
 (0)