react-crud-mobile 1.0.482 → 1.0.484

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.
@@ -32,6 +32,10 @@ export default function UIModal(props: ChildType) {
32
32
  return { ...scope.getStyle(part, st) };
33
33
  };
34
34
 
35
+ const onClose = () => {
36
+ scope.close({ scope, crud, event: {} });
37
+ };
38
+
35
39
  const toggle = vis => {
36
40
  modalVisible = vis;
37
41
  setModalVisible(modalVisible);
@@ -70,23 +74,16 @@ export default function UIModal(props: ChildType) {
70
74
  return <></>;
71
75
  }
72
76
 
73
- let onClose = () => {
74
- scope.close({ scope, crud, event: {} });
75
- };
76
-
77
77
  return (
78
78
  <Modal
79
79
  animationType="slide"
80
80
  transparent={true}
81
81
  visible={modalVisible}
82
- onRequestClose={() => onClose}
82
+ onRequestClose={onClose}
83
83
  >
84
84
  <SafeAreaView style={style('modalSafe')}>
85
85
  <View style={style('modalHeader')}>
86
- <TouchableOpacity
87
- onPress={() => onClose}
88
- style={style('modalCloseButton')}
89
- >
86
+ <TouchableOpacity onPress={onClose} style={style('modalCloseButton')}>
90
87
  <Text style={style('modalCloseText')}>X</Text>
91
88
  </TouchableOpacity>
92
89
  <Text style={style('modalTitle')}>{label}</Text>