Skip to content

Commit 7818ae2

Browse files
committed
fix: animations of poll dialog
1 parent 4e46d8c commit 7818ae2

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

package/src/components/Poll/components/PollInputDialog.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import {
1010
View,
1111
} from 'react-native';
1212

13+
import Animated, { LinearTransition, ZoomIn } from 'react-native-reanimated';
14+
1315
import { useTheme, useTranslationContext } from '../../../contexts';
1416

1517
export type PollInputDialogProps = {
@@ -52,7 +54,11 @@ export const PollInputDialog = ({
5254
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
5355
style={[styles.transparentContainer, transparentContainer]}
5456
>
55-
<View style={[styles.container, { backgroundColor: white }, container]}>
57+
<Animated.View
58+
entering={ZoomIn.duration(200)}
59+
layout={LinearTransition.duration(200)}
60+
style={[styles.container, { backgroundColor: white }, container]}
61+
>
5662
<Text style={[styles.title, { color: black }, titleStyle]}>{title}</Text>
5763
<TextInput
5864
autoFocus={true}
@@ -80,7 +86,7 @@ export const PollInputDialog = ({
8086
<Text style={[styles.button, { color: accent_dark_blue }, button]}>{t('SEND')}</Text>
8187
</Pressable>
8288
</View>
83-
</View>
89+
</Animated.View>
8490
</KeyboardAvoidingView>
8591
</Modal>
8692
);

0 commit comments

Comments
 (0)