react-crud-mobile 1.3.134 → 1.3.136

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,5 +1,5 @@
1
1
  {
2
- "version": "1.3.134",
2
+ "version": "1.3.136",
3
3
  "license": "MIT",
4
4
  "description": "Uma biblioteca de componentes para React Native",
5
5
  "main": "dist/index.js",
@@ -95,6 +95,35 @@ export default function UIModal({
95
95
  );
96
96
  };
97
97
 
98
+ let ModalContent = ({ children }) => {
99
+ let disableScroll = scope.getPart('disableScroll', false);
100
+ let disableContent = scope.getPart('disableContent', false);
101
+
102
+ console.log(scope.original);
103
+
104
+ if (disableContent) {
105
+ return <>{children}</>;
106
+ }
107
+
108
+ if (disableScroll) {
109
+ return (
110
+ <View style={style('modalContent')} ref={scrollRef}>
111
+ {children}
112
+ </View>
113
+ );
114
+ }
115
+ return (
116
+ <ScrollView
117
+ contentContainerStyle={{ flexGrow: 1, paddingBottom: 50 }}
118
+ style={style('modalContent')}
119
+ nestedScrollEnabled={true}
120
+ ref={scrollRef}
121
+ >
122
+ {children}
123
+ </ScrollView>
124
+ );
125
+ };
126
+
98
127
  return (
99
128
  <Modal
100
129
  key={key}
@@ -121,12 +150,7 @@ export default function UIModal({
121
150
  </UIChildren>
122
151
  )}
123
152
  </View>
124
- <ScrollView
125
- contentContainerStyle={{ flexGrow: 1, paddingBottom: 50 }}
126
- style={style('modalContent')}
127
- nestedScrollEnabled={true}
128
- ref={scrollRef}
129
- >
153
+ <ModalContent>
130
154
  <View
131
155
  style={{
132
156
  flex: 1,
@@ -138,7 +162,7 @@ export default function UIModal({
138
162
  >
139
163
  <Content />
140
164
  </View>
141
- </ScrollView>
165
+ </ModalContent>
142
166
  {bottom}
143
167
  </SafeAreaView>
144
168
  <UIToast />