@arkyn/components 1.3.145 → 1.3.146
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/bundle.js +27047 -15953
- package/dist/bundle.umd.cjs +481 -206
- package/dist/provider/ToastProvider.d.ts.map +1 -1
- package/dist/provider/ToastProvider.js +26 -2
- package/package.json +1 -1
- package/src/provider/ToastProvider.tsx +26 -2
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ToastProvider.d.ts","sourceRoot":"","sources":["../../src/provider/ToastProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAK9D,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,kBAAkB,
|
1
|
+
{"version":3,"file":"ToastProvider.d.ts","sourceRoot":"","sources":["../../src/provider/ToastProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAK9D,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,kBAAkB,2CA2CtD;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
@@ -5,9 +5,33 @@ function ToastProvider({ children }) {
|
|
5
5
|
function showToast(props) {
|
6
6
|
switch (props.type) {
|
7
7
|
case "success":
|
8
|
-
return toast.success(props.message
|
8
|
+
return toast.success(props.message, {
|
9
|
+
style: {
|
10
|
+
background: "#10B981",
|
11
|
+
color: "#ffffff",
|
12
|
+
padding: "12px 16px",
|
13
|
+
fontSize: "14px",
|
14
|
+
fontWeight: 600,
|
15
|
+
},
|
16
|
+
iconTheme: {
|
17
|
+
primary: "#059669",
|
18
|
+
secondary: "#ffffff",
|
19
|
+
},
|
20
|
+
});
|
9
21
|
case "danger":
|
10
|
-
return toast.error(props.message
|
22
|
+
return toast.error(props.message, {
|
23
|
+
style: {
|
24
|
+
background: "#E11D48",
|
25
|
+
color: "#ffffff",
|
26
|
+
padding: "12px 16px",
|
27
|
+
fontSize: "14px",
|
28
|
+
fontWeight: 600,
|
29
|
+
},
|
30
|
+
iconTheme: {
|
31
|
+
primary: "#BE123C",
|
32
|
+
secondary: "#ffffff",
|
33
|
+
},
|
34
|
+
});
|
11
35
|
}
|
12
36
|
}
|
13
37
|
return (_jsxs(ToastContext.Provider, { value: { showToast }, children: [_jsx(Toaster, { position: "top-right", containerStyle: { zIndex: 999999999999999 } }), children] }));
|
package/package.json
CHANGED
@@ -7,9 +7,33 @@ function ToastProvider({ children }: ToastProviderProps) {
|
|
7
7
|
function showToast(props: ToastProps) {
|
8
8
|
switch (props.type) {
|
9
9
|
case "success":
|
10
|
-
return toast.success(props.message
|
10
|
+
return toast.success(props.message, {
|
11
|
+
style: {
|
12
|
+
background: "#10B981",
|
13
|
+
color: "#ffffff",
|
14
|
+
padding: "12px 16px",
|
15
|
+
fontSize: "14px",
|
16
|
+
fontWeight: 600,
|
17
|
+
},
|
18
|
+
iconTheme: {
|
19
|
+
primary: "#059669",
|
20
|
+
secondary: "#ffffff",
|
21
|
+
},
|
22
|
+
});
|
11
23
|
case "danger":
|
12
|
-
return toast.error(props.message
|
24
|
+
return toast.error(props.message, {
|
25
|
+
style: {
|
26
|
+
background: "#E11D48",
|
27
|
+
color: "#ffffff",
|
28
|
+
padding: "12px 16px",
|
29
|
+
fontSize: "14px",
|
30
|
+
fontWeight: 600,
|
31
|
+
},
|
32
|
+
iconTheme: {
|
33
|
+
primary: "#BE123C",
|
34
|
+
secondary: "#ffffff",
|
35
|
+
},
|
36
|
+
});
|
13
37
|
}
|
14
38
|
}
|
15
39
|
|