react-toast-master 2.1.9 → 2.2.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/{build/index.d.ts → index.d.ts} +38 -15
- package/jsconfig.json +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
declare module "react-toast-master" {
|
|
2
2
|
import { ComponentType, ReactNode } from "react";
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* The options for the toast.
|
|
6
|
+
*/
|
|
4
7
|
export interface ToastOptions {
|
|
5
8
|
type?: "success" | "error" | "info" | "loading" | "warning" | "basic" | "confirm";
|
|
6
9
|
position?:
|
|
@@ -10,10 +13,10 @@ declare module "react-toast-master" {
|
|
|
10
13
|
| "bottomLeft"
|
|
11
14
|
| "bottom"
|
|
12
15
|
| "bottomRight"
|
|
13
|
-
| "
|
|
16
|
+
| "center"
|
|
14
17
|
| "topFull"
|
|
15
18
|
| "bottomFull";
|
|
16
|
-
|
|
19
|
+
message?: "string";
|
|
17
20
|
transition?: "zoom" | "fade" | "slide" | "down" | "up" | "left" | "right" | "jelly";
|
|
18
21
|
cancelButton?: boolean;
|
|
19
22
|
skew?: "three" | "six" | "twelve";
|
|
@@ -31,24 +34,44 @@ declare module "react-toast-master" {
|
|
|
31
34
|
radius?: "none" | "sm" | "md" | "lg" | "xl" | "twoXl" | "full";
|
|
32
35
|
bg?: "dark" | "white" | "info" | "error" | "success" | "gray" | "glass" | "transparent";
|
|
33
36
|
align?: "left" | "right" | "center";
|
|
37
|
+
footer?: ReactNode;
|
|
38
|
+
loadFooter?: ReactNode;
|
|
34
39
|
}
|
|
35
40
|
|
|
41
|
+
/**
|
|
42
|
+
* The props for the ToastContainer.
|
|
43
|
+
*/
|
|
36
44
|
export interface ToastContainerProps {
|
|
37
|
-
type
|
|
38
|
-
message
|
|
39
|
-
bg
|
|
40
|
-
transition
|
|
41
|
-
position
|
|
42
|
-
skew
|
|
43
|
-
cancelButton
|
|
44
|
-
shadow
|
|
45
|
-
radius
|
|
46
|
-
align
|
|
47
|
-
|
|
45
|
+
type: string;
|
|
46
|
+
message: string;
|
|
47
|
+
bg: string;
|
|
48
|
+
transition: string;
|
|
49
|
+
position: string;
|
|
50
|
+
skew: string;
|
|
51
|
+
cancelButton: boolean;
|
|
52
|
+
shadow: string;
|
|
53
|
+
radius: string;
|
|
54
|
+
align: string;
|
|
55
|
+
footer: ReactNode;
|
|
56
|
+
loadFooter: ReactNode;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* The functions exposed by the useToast hook.
|
|
61
|
+
*/
|
|
62
|
+
export interface ToastFunctions {
|
|
63
|
+
toastMaster: (options?: ToastOptions) => void;
|
|
64
|
+
hideToast: () => void;
|
|
48
65
|
}
|
|
49
66
|
|
|
50
|
-
|
|
51
|
-
|
|
67
|
+
/**
|
|
68
|
+
* The useToast hook.
|
|
69
|
+
* @returns The ToastFunctions.
|
|
70
|
+
*/
|
|
71
|
+
export function useToast(): ToastFunctions;
|
|
52
72
|
|
|
73
|
+
/**
|
|
74
|
+
* The ToastProvider component.
|
|
75
|
+
*/
|
|
53
76
|
export const ToastProvider: ComponentType<ToastContainerProps>;
|
|
54
77
|
}
|
package/jsconfig.json
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-toast-master",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "React's most customizable toast notification component.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
|
-
"types": "
|
|
6
|
+
"types": "index.d.ts",
|
|
7
7
|
"author": "mk-saadi",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"keywords": [
|