gbs-add-block 0.0.17 → 0.0.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gbs-add-block",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "description": "React Component Library",
5
5
  "files": [
6
6
  "index.js",
@@ -5,6 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
+ "use client";
8
9
  import React from "react";
9
10
  import { useToastStore } from "./toastAtom";
10
11
  import Toast from "./Toast";
@@ -6,15 +6,19 @@ export type Toast = {
6
6
  id: number;
7
7
  type: ToastType;
8
8
  message: string | ReactNode;
9
+ title: string | ReactNode;
9
10
  dismissible: boolean;
10
11
  timeout: number;
12
+ action?: any;
11
13
  };
12
14
 
13
15
  export type ToastOptions = {
14
16
  message: string | ReactNode;
17
+ title?: string | ReactNode;
15
18
  type?: ToastType;
16
19
  dismissible?: boolean;
17
20
  timeout?: number;
21
+ action?: any;
18
22
  };
19
23
 
20
24
  export type ToastPosition =
@@ -6,16 +6,20 @@ const useToast = () => {
6
6
 
7
7
  return {
8
8
  addToast: ({
9
+ title,
9
10
  message,
10
11
  type = "info",
11
12
  dismissible = false,
12
13
  timeout = 3000,
14
+ action,
13
15
  }: ToastOptions) =>
14
16
  addToast({
17
+ title,
15
18
  message,
16
19
  type,
17
20
  dismissible,
18
21
  timeout,
22
+ action,
19
23
  }),
20
24
  dismissToast,
21
25
  };