@nok-integration/storefront-react 0.18.3 → 0.18.4
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/index.mjs +2 -1
- package/dist/standalone/storefront.mjs +2 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6180,6 +6180,7 @@ function Caret() {
|
|
|
6180
6180
|
) });
|
|
6181
6181
|
}
|
|
6182
6182
|
let nextId = 0;
|
|
6183
|
+
const DISMISS_AFTER_MS = 2e3;
|
|
6183
6184
|
function ToastProvider({ children }) {
|
|
6184
6185
|
const [toasts, setToasts] = useState([]);
|
|
6185
6186
|
const viewportRef = useRef(null);
|
|
@@ -6206,7 +6207,7 @@ function ToastProvider({ children }) {
|
|
|
6206
6207
|
}
|
|
6207
6208
|
const id = nextId++;
|
|
6208
6209
|
setToasts((prev) => [...prev, { ...opts, id, message: message2, tone, action: action2 }]);
|
|
6209
|
-
setTimeout(() => dismiss(id),
|
|
6210
|
+
setTimeout(() => dismiss(id), DISMISS_AFTER_MS);
|
|
6210
6211
|
},
|
|
6211
6212
|
[dismiss, hostOwnsNotifications, emit]
|
|
6212
6213
|
);
|
|
@@ -6180,6 +6180,7 @@ function Caret() {
|
|
|
6180
6180
|
) });
|
|
6181
6181
|
}
|
|
6182
6182
|
let nextId = 0;
|
|
6183
|
+
const DISMISS_AFTER_MS = 2e3;
|
|
6183
6184
|
function ToastProvider({ children }) {
|
|
6184
6185
|
const [toasts, setToasts] = useState([]);
|
|
6185
6186
|
const viewportRef = useRef(null);
|
|
@@ -6206,7 +6207,7 @@ function ToastProvider({ children }) {
|
|
|
6206
6207
|
}
|
|
6207
6208
|
const id = nextId++;
|
|
6208
6209
|
setToasts((prev) => [...prev, { ...opts, id, message: message2, tone, action: action2 }]);
|
|
6209
|
-
setTimeout(() => dismiss(id),
|
|
6210
|
+
setTimeout(() => dismiss(id), DISMISS_AFTER_MS);
|
|
6210
6211
|
},
|
|
6211
6212
|
[dismiss, hostOwnsNotifications, emit]
|
|
6212
6213
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nok-integration/storefront-react",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.4",
|
|
4
4
|
"description": "Mountable React storefront components: catalogue, product detail and cart, mounted directly into a host DOM tree. No iframe.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|