design-zystem 1.0.272 → 1.0.273
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.js +7 -2
- package/dist/index.mjs +7 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1640,7 +1640,12 @@ var import_react7 = require("react");
|
|
|
1640
1640
|
var import_styled_components13 = __toESM(require("styled-components"));
|
|
1641
1641
|
|
|
1642
1642
|
// src/Components/Toast/toastStore.ts
|
|
1643
|
-
var
|
|
1643
|
+
var DEFAULT_TIMEOUT_BY_TYPE = {
|
|
1644
|
+
success: 2e3,
|
|
1645
|
+
info: 2e3,
|
|
1646
|
+
warning: 4e3,
|
|
1647
|
+
error: 5e3
|
|
1648
|
+
};
|
|
1644
1649
|
var toasts = [];
|
|
1645
1650
|
var nextId = 0;
|
|
1646
1651
|
var listeners = /* @__PURE__ */ new Set();
|
|
@@ -1665,7 +1670,7 @@ var pushToast = (type, message, options = {}) => {
|
|
|
1665
1670
|
type,
|
|
1666
1671
|
message,
|
|
1667
1672
|
title: options.title,
|
|
1668
|
-
timeOut: (_a = options.timeOut) != null ? _a :
|
|
1673
|
+
timeOut: (_a = options.timeOut) != null ? _a : DEFAULT_TIMEOUT_BY_TYPE[type]
|
|
1669
1674
|
}
|
|
1670
1675
|
];
|
|
1671
1676
|
emitChange();
|
package/dist/index.mjs
CHANGED
|
@@ -1504,7 +1504,12 @@ import { useCallback as useCallback2, useEffect as useEffect5, useState as useSt
|
|
|
1504
1504
|
import styled13, { keyframes } from "styled-components";
|
|
1505
1505
|
|
|
1506
1506
|
// src/Components/Toast/toastStore.ts
|
|
1507
|
-
var
|
|
1507
|
+
var DEFAULT_TIMEOUT_BY_TYPE = {
|
|
1508
|
+
success: 2e3,
|
|
1509
|
+
info: 2e3,
|
|
1510
|
+
warning: 4e3,
|
|
1511
|
+
error: 5e3
|
|
1512
|
+
};
|
|
1508
1513
|
var toasts = [];
|
|
1509
1514
|
var nextId = 0;
|
|
1510
1515
|
var listeners = /* @__PURE__ */ new Set();
|
|
@@ -1529,7 +1534,7 @@ var pushToast = (type, message, options = {}) => {
|
|
|
1529
1534
|
type,
|
|
1530
1535
|
message,
|
|
1531
1536
|
title: options.title,
|
|
1532
|
-
timeOut: (_a = options.timeOut) != null ? _a :
|
|
1537
|
+
timeOut: (_a = options.timeOut) != null ? _a : DEFAULT_TIMEOUT_BY_TYPE[type]
|
|
1533
1538
|
}
|
|
1534
1539
|
];
|
|
1535
1540
|
emitChange();
|