@team-frieeren/components 1.0.14 → 1.0.15
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/Toast.js
CHANGED
|
@@ -311,13 +311,7 @@ var defaultToastValue = {
|
|
|
311
311
|
duration: 3000,
|
|
312
312
|
position: "top-right"
|
|
313
313
|
};
|
|
314
|
-
var ToastContext = /*#__PURE__*/createContext(
|
|
315
|
-
toasts: [],
|
|
316
|
-
add: function add() {
|
|
317
|
-
return "";
|
|
318
|
-
},
|
|
319
|
-
remove: function remove() {}
|
|
320
|
-
});
|
|
314
|
+
var ToastContext = /*#__PURE__*/createContext(null);
|
|
321
315
|
var ToastPortal = function ToastPortal(_a) {
|
|
322
316
|
var children = _a.children;
|
|
323
317
|
var isMounted = useIsMounted();
|
|
@@ -387,11 +381,10 @@ var ToastProvider = function ToastProvider(_a) {
|
|
|
387
381
|
}, []);
|
|
388
382
|
var value = useMemo(function () {
|
|
389
383
|
return {
|
|
390
|
-
toasts: toasts,
|
|
391
384
|
add: add,
|
|
392
385
|
remove: remove
|
|
393
386
|
};
|
|
394
|
-
}, [
|
|
387
|
+
}, [add, remove]);
|
|
395
388
|
return jsxs(ToastContext.Provider, {
|
|
396
389
|
value: value,
|
|
397
390
|
children: [children, jsx(ToastPortal, {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ToastContextValue, ToastProviderProps } from "./Toast.type";
|
|
2
|
-
export declare const ToastContext: import("react").Context<ToastContextValue>;
|
|
2
|
+
export declare const ToastContext: import("react").Context<ToastContextValue | null>;
|
|
3
3
|
export declare const ToastProvider: ({ options, children }: ToastProviderProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -497,13 +497,7 @@ var defaultToastValue = {
|
|
|
497
497
|
duration: 3000,
|
|
498
498
|
position: "top-right"
|
|
499
499
|
};
|
|
500
|
-
var ToastContext = /*#__PURE__*/createContext(
|
|
501
|
-
toasts: [],
|
|
502
|
-
add: function add() {
|
|
503
|
-
return "";
|
|
504
|
-
},
|
|
505
|
-
remove: function remove() {}
|
|
506
|
-
});
|
|
500
|
+
var ToastContext = /*#__PURE__*/createContext(null);
|
|
507
501
|
var ToastPortal = function ToastPortal(_a) {
|
|
508
502
|
var children = _a.children;
|
|
509
503
|
var isMounted = useIsMounted();
|
|
@@ -573,11 +567,10 @@ var ToastProvider = function ToastProvider(_a) {
|
|
|
573
567
|
}, []);
|
|
574
568
|
var value = useMemo(function () {
|
|
575
569
|
return {
|
|
576
|
-
toasts: toasts,
|
|
577
570
|
add: add,
|
|
578
571
|
remove: remove
|
|
579
572
|
};
|
|
580
|
-
}, [
|
|
573
|
+
}, [add, remove]);
|
|
581
574
|
return jsxs(ToastContext.Provider, {
|
|
582
575
|
value: value,
|
|
583
576
|
children: [children, jsx(ToastPortal, {
|