sapo-components-ui-rn 1.0.6 → 1.0.8
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/components/Toast/ToastProvider.d.ts +1 -0
- package/dist/index.esm.js +6 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/utils/toast-manager.d.ts +3 -1
- package/package.json +1 -1
- package/src/components/Toast/ToastProvider.tsx +1 -0
- package/src/components/Toast/index.tsx +4 -4
- package/src/utils/toast-manager.tsx +4 -0
package/dist/index.esm.js
CHANGED
|
@@ -6279,13 +6279,13 @@ var Toast = memoWithRef(function (_props, ref) {
|
|
|
6279
6279
|
}
|
|
6280
6280
|
switch (spacer) {
|
|
6281
6281
|
case "normal":
|
|
6282
|
-
return
|
|
6282
|
+
return 0;
|
|
6283
6283
|
case "medium":
|
|
6284
|
-
return
|
|
6284
|
+
return 72;
|
|
6285
6285
|
case "large":
|
|
6286
|
-
return
|
|
6286
|
+
return 104;
|
|
6287
6287
|
default:
|
|
6288
|
-
return
|
|
6288
|
+
return 0;
|
|
6289
6289
|
}
|
|
6290
6290
|
};
|
|
6291
6291
|
return (React__default.createElement(ViewVisibleAnimated, { ref: viewVisibleAnimatedRef, autoShow: false, scaleEnable: true, style: [
|
|
@@ -6797,7 +6797,7 @@ var SearchInput = function (_a) {
|
|
|
6797
6797
|
|
|
6798
6798
|
var toastRef = React__default.createRef();
|
|
6799
6799
|
var showToast = function (_a) {
|
|
6800
|
-
var message = _a.message, _b = _a.duration, duration = _b === void 0 ? 5000 : _b, _c = _a.position, position = _c === void 0 ? "top" : _c, _d = _a.type, type = _d === void 0 ? "success" : _d, _e = _a.onPress, onPress = _e === void 0 ? function () { } : _e, title = _a.title;
|
|
6800
|
+
var message = _a.message, _b = _a.duration, duration = _b === void 0 ? 5000 : _b, _c = _a.position, position = _c === void 0 ? "top" : _c, _d = _a.type, type = _d === void 0 ? "success" : _d, _e = _a.onPress, onPress = _e === void 0 ? function () { } : _e, title = _a.title, _f = _a.spacer, spacer = _f === void 0 ? "normal" : _f;
|
|
6801
6801
|
if (!toastRef.current) {
|
|
6802
6802
|
console.warn("Toast component is not mounted. Make sure to add <ToastProvider> to your app.");
|
|
6803
6803
|
return;
|
|
@@ -6809,6 +6809,7 @@ var showToast = function (_a) {
|
|
|
6809
6809
|
type: type,
|
|
6810
6810
|
onPress: onPress,
|
|
6811
6811
|
title: title,
|
|
6812
|
+
spacer: spacer,
|
|
6812
6813
|
});
|
|
6813
6814
|
};
|
|
6814
6815
|
|