ag-common 0.0.539 → 0.0.540

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.
@@ -57,6 +57,7 @@ const ModalBase = styled_1.default.div `
57
57
  0 2px 15px 0 rgba(0, 0, 0, 0.05);
58
58
  max-width: 95vw;
59
59
  max-height: 95vh;
60
+ overflow: hidden;
60
61
  &[data-position='left'] {
61
62
  left: 0;
62
63
  }
@@ -141,7 +141,8 @@ exports.Toast = Toast;
141
141
  const ToastProvider = ({ children, providerOptions, }) => {
142
142
  const [toasts, setToasts] = (0, react_1.useState)([]);
143
143
  const addToast = (message, options) => setToasts((currentToasts) => [
144
- ...currentToasts,
144
+ ...currentToasts.filter((ct) => ct.message !== message ||
145
+ JSON.stringify(ct.options) !== JSON.stringify(options)),
145
146
  { id: (0, random_1.random)(10000).toString(), message, options },
146
147
  ]);
147
148
  const close = (id) => setToasts((currentToasts) => currentToasts.filter((toast) => toast.id !== id));
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.539",
2
+ "version": "0.0.540",
3
3
  "name": "ag-common",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",