add animation to base dialog

This commit is contained in:
ammarahm-ed
2021-11-11 13:08:39 +05:00
parent 352356724d
commit 0b64bbcf74
2 changed files with 8 additions and 10 deletions

View File

@@ -51,10 +51,8 @@ const BaseDialog = ({
<KeyboardAvoidingView
enabled={!floating && Platform.OS === 'ios'}
behavior="padding">
<BouncingView
duration={400}
duration={400}
style={[
styles.backdrop,
{
@@ -65,11 +63,11 @@ const BaseDialog = ({
: 'flex-start'
}
]}>
<TouchableOpacity
onPress={onRequestClose}
style={styles.overlayButton}
/>
{premium}
<TouchableOpacity
onPress={onRequestClose}
style={styles.overlayButton}
/>
{premium}
{children}
</BouncingView>
</KeyboardAvoidingView>
@@ -88,7 +86,7 @@ const styles = StyleSheet.create({
overlayButton: {
width: '100%',
height: '100%',
position: 'absolute',
position: 'absolute'
}
});

View File

@@ -13,7 +13,7 @@ const DialogContainer = ({width, height, ...restProps}) => {
{...restProps}
style={{
...getElevation(5),
width: width || DDS.isTab ? 400 : '85%',
width: width || DDS.isTab ? 500 : '85%',
maxHeight: height || 450,
borderRadius: 10,
backgroundColor: colors.bg,