@pushwoosh/dumb-components 1.1.69 → 1.1.70

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.
@@ -18,14 +18,18 @@ export const ToastProvider = ({
18
18
  title = '',
19
19
  description = '',
20
20
  duration = DEFAULT_DURATION,
21
- type = 'info'
21
+ type = 'info',
22
+ buttonText = '',
23
+ onButtonClick
22
24
  }) => {
23
25
  setOpen(true);
24
26
  setToast({
25
27
  title,
26
28
  description,
27
29
  duration,
28
- type
30
+ type,
31
+ buttonText,
32
+ onButtonClick
29
33
  });
30
34
  if (typeof duration === 'number') {
31
35
  setTimeout(closeToast, duration);
package/Toast/types.d.ts CHANGED
@@ -13,6 +13,8 @@ export type OpenToastParams = {
13
13
  description?: string;
14
14
  duration?: number | false;
15
15
  type?: ToastType;
16
+ buttonText?: string;
17
+ onButtonClick?: () => void;
16
18
  };
17
19
  export interface ToastContextProps {
18
20
  openToast: (params: OpenToastParams) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/dumb-components",
3
- "version": "1.1.69",
3
+ "version": "1.1.70",
4
4
  "description": "React components to build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",