@mappedin/viewer 0.35.1-488ebfa.0 → 0.35.1-a4cba26.0
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 +2200 -2163
- package/dist/types/src/components/toast/default-toast.d.ts +3 -0
- package/dist/types/src/components/toast/index.d.ts +1 -1
- package/dist/types/src/components/toast/toast-item.d.ts +3 -6
- package/dist/types/src/components/toast/utils.d.ts +7 -3
- package/package.json +1 -1
|
@@ -3,5 +3,5 @@ export declare const ToastContainer: React.FC;
|
|
|
3
3
|
/**
|
|
4
4
|
* Render a toast on the page.
|
|
5
5
|
*/
|
|
6
|
-
declare const toast: (
|
|
6
|
+
declare const toast: (content: TToast["content"], options?: Partial<Omit<TToast, "id" | "content">>) => void;
|
|
7
7
|
export default toast;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
timeout?: number;
|
|
5
|
-
icon?: string;
|
|
6
|
-
onClose?: (id: string) => void;
|
|
1
|
+
import { TToast } from './utils';
|
|
2
|
+
type TToastItemProps = TToast & {
|
|
3
|
+
closeToast?: (id: string) => void;
|
|
7
4
|
};
|
|
8
5
|
declare const ToastItem: React.FC<TToastItemProps>;
|
|
9
6
|
export default ToastItem;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { PubSub } from '../../lib/pub-sub';
|
|
2
|
-
export type
|
|
2
|
+
export type TBaseToast = {
|
|
3
3
|
id: string;
|
|
4
|
-
|
|
5
|
-
icon?: string;
|
|
4
|
+
icon?: string | React.ReactElement;
|
|
6
5
|
timeout?: number;
|
|
6
|
+
onClose?: () => void;
|
|
7
|
+
};
|
|
8
|
+
export type TCustomToastFn = (toast: TBaseToast) => React.ReactNode;
|
|
9
|
+
export type TToast = TBaseToast & {
|
|
10
|
+
content: string | TCustomToastFn;
|
|
7
11
|
};
|
|
8
12
|
export declare enum E_TOAST_EVENT {
|
|
9
13
|
SHOW = "SHOW"
|