@solucx/react-native-solucx-widget 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solucx/react-native-solucx-widget",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "The React Native SDK for Solucx Widget",
5
5
  "main": "src/index",
6
6
  "author": " <> ()",
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from 'react';
2
- import { View, ViewStyle, Modal } from 'react-native';
2
+ import { View, ViewStyle, Modal, SafeAreaView } from 'react-native';
3
3
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
4
4
  import { getWidgetStyles, getWidgetVisibility } from '../styles/widgetStyles';
5
5
  import { FIXED_Z_INDEX } from '../constants/webViewConstants';
@@ -45,26 +45,28 @@ export const OverlayWidget: React.FC<OverlayWidgetProps> = ({ visible, width, he
45
45
  ];
46
46
 
47
47
  return (
48
- <Modal
49
- transparent
50
- visible={isWidgetVisible}
51
- animationType="fade"
52
- hardwareAccelerated
53
- >
54
- <View style={[containerStyle, getWidgetVisibility(visible)]}>
55
- <View style={[contentStyle, getWidgetVisibility(visible)]}>
56
- {children}
57
- <CloseButton
58
- visible={visible}
59
- onPress={() => {
60
- setIsWidgetVisible(false);
61
- if (onClose) {
62
- onClose();
63
- }
64
- }}
65
- />
48
+ <SafeAreaView>
49
+ <Modal
50
+ transparent
51
+ visible={isWidgetVisible}
52
+ animationType="fade"
53
+ hardwareAccelerated
54
+ >
55
+ <View style={[containerStyle, getWidgetVisibility(visible)]}>
56
+ <View style={[contentStyle, getWidgetVisibility(visible)]}>
57
+ {children}
58
+ <CloseButton
59
+ visible={visible}
60
+ onPress={() => {
61
+ setIsWidgetVisible(false);
62
+ if (onClose) {
63
+ onClose();
64
+ }
65
+ }}
66
+ />
67
+ </View>
66
68
  </View>
67
- </View>
68
- </Modal>
69
+ </Modal>
70
+ </SafeAreaView>
69
71
  );
70
72
  };