react-crud-mobile 1.0.839 → 1.0.840
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/dist/elements/core/UIToast.d.ts +2 -0
- package/dist/react-crud-mobile.cjs.development.js +46 -4
- package/dist/react-crud-mobile.cjs.development.js.map +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js.map +1 -1
- package/dist/react-crud-mobile.esm.js +44 -3
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/core/UIModal.tsx +2 -2
- package/src/elements/core/UIToast.tsx +43 -0
- package/src/elements/core/UIView.tsx +2 -2
|
@@ -11,7 +11,8 @@ var reactNative = require('react-native');
|
|
|
11
11
|
var jsxRuntime = require('react/jsx-runtime');
|
|
12
12
|
var Ionicons = _interopDefault(require('@expo/vector-icons/Ionicons'));
|
|
13
13
|
var vectorIcons = require('@expo/vector-icons');
|
|
14
|
-
var Toast =
|
|
14
|
+
var Toast = require('react-native-toast-message');
|
|
15
|
+
var Toast__default = _interopDefault(Toast);
|
|
15
16
|
var reactNativeSafeAreaContext = require('react-native-safe-area-context');
|
|
16
17
|
|
|
17
18
|
function _extends() {
|
|
@@ -1190,6 +1191,47 @@ function UIQuantity(props) {
|
|
|
1190
1191
|
});
|
|
1191
1192
|
}
|
|
1192
1193
|
|
|
1194
|
+
function UIToast() {
|
|
1195
|
+
var toastConfig = {
|
|
1196
|
+
success: function success(props) {
|
|
1197
|
+
return /*#__PURE__*/jsxRuntime.jsx(Toast.BaseToast, _extends({}, props, {
|
|
1198
|
+
style: styles.darkToast,
|
|
1199
|
+
contentContainerStyle: {
|
|
1200
|
+
paddingHorizontal: 15
|
|
1201
|
+
},
|
|
1202
|
+
text1Style: styles.text,
|
|
1203
|
+
text2Style: styles.text
|
|
1204
|
+
}));
|
|
1205
|
+
},
|
|
1206
|
+
error: function error(props) {
|
|
1207
|
+
return /*#__PURE__*/jsxRuntime.jsx(Toast.ErrorToast, _extends({}, props, {
|
|
1208
|
+
style: styles.darkToast,
|
|
1209
|
+
text1Style: styles.text,
|
|
1210
|
+
text2Style: styles.text
|
|
1211
|
+
}));
|
|
1212
|
+
},
|
|
1213
|
+
info: function info(props) {
|
|
1214
|
+
return /*#__PURE__*/jsxRuntime.jsx(Toast.BaseToast, _extends({}, props, {
|
|
1215
|
+
style: styles.darkToast,
|
|
1216
|
+
text1Style: styles.text,
|
|
1217
|
+
text2Style: styles.text
|
|
1218
|
+
}));
|
|
1219
|
+
}
|
|
1220
|
+
};
|
|
1221
|
+
var styles = reactNative.StyleSheet.create({
|
|
1222
|
+
darkToast: {
|
|
1223
|
+
backgroundColor: '#222',
|
|
1224
|
+
borderLeftColor: '#555'
|
|
1225
|
+
},
|
|
1226
|
+
text: {
|
|
1227
|
+
color: '#fff'
|
|
1228
|
+
}
|
|
1229
|
+
});
|
|
1230
|
+
return /*#__PURE__*/jsxRuntime.jsx(Toast__default, {
|
|
1231
|
+
config: toastConfig
|
|
1232
|
+
});
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1193
1235
|
function UIModal(props) {
|
|
1194
1236
|
var _theme$styles, _main$dialog2;
|
|
1195
1237
|
var _useState = React.useState(false),
|
|
@@ -1319,7 +1361,7 @@ function UIModal(props) {
|
|
|
1319
1361
|
})
|
|
1320
1362
|
})
|
|
1321
1363
|
})]
|
|
1322
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
1364
|
+
}), /*#__PURE__*/jsxRuntime.jsx(UIToast, {})]
|
|
1323
1365
|
});
|
|
1324
1366
|
}
|
|
1325
1367
|
var styles$8 = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
@@ -1405,7 +1447,7 @@ function UIView(_ref) {
|
|
|
1405
1447
|
children: children
|
|
1406
1448
|
})
|
|
1407
1449
|
})
|
|
1408
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
1450
|
+
}), /*#__PURE__*/jsxRuntime.jsx(UIToast, {})]
|
|
1409
1451
|
});
|
|
1410
1452
|
}
|
|
1411
1453
|
var styles$9 = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
@@ -1453,7 +1495,7 @@ function UIElement(props) {
|
|
|
1453
1495
|
if (type === void 0) {
|
|
1454
1496
|
type = 'info';
|
|
1455
1497
|
}
|
|
1456
|
-
|
|
1498
|
+
Toast__default.show(_extends({
|
|
1457
1499
|
type: type,
|
|
1458
1500
|
text1: message,
|
|
1459
1501
|
position: 'bottom',
|