gotrip-fx-transaction-form 1.0.118 → 1.0.120

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/index.js CHANGED
@@ -3097,7 +3097,8 @@ const zD = (e) => {
3097
3097
  isLoading: !1,
3098
3098
  modal: {
3099
3099
  error: { isOpen: !1, message: "" },
3100
- success: { isOpen: !1, message: "" }
3100
+ success: { isOpen: !1, message: "" },
3101
+ confirm: { isOpen: !1, title: void 0, description: void 0, onConfirm: void 0 }
3101
3102
  },
3102
3103
  setIsLoading: (t) => e({ isLoading: t }),
3103
3104
  setModalError: ({ isOpen: t, message: r }) => e((n) => ({
@@ -3111,6 +3112,28 @@ const zD = (e) => {
3111
3112
  })),
3112
3113
  closeModalSuccess: () => e((t) => ({
3113
3114
  modal: { ...t.modal, success: { isOpen: !1, message: "" } }
3115
+ })),
3116
+ setModalConfirm: ({
3117
+ isOpen: t,
3118
+ title: r,
3119
+ description: n,
3120
+ onConfirm: a
3121
+ }) => e((i) => ({
3122
+ modal: {
3123
+ ...i.modal,
3124
+ confirm: {
3125
+ isOpen: t,
3126
+ title: r,
3127
+ description: n,
3128
+ onConfirm: a
3129
+ }
3130
+ }
3131
+ })),
3132
+ closeModalConfirm: () => e((t) => ({
3133
+ modal: {
3134
+ ...t.modal,
3135
+ confirm: { isOpen: !1, title: void 0, description: void 0, onConfirm: void 0 }
3136
+ }
3114
3137
  }))
3115
3138
  }));
3116
3139
  function _6(e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gotrip-fx-transaction-form",
3
- "version": "1.0.118",
3
+ "version": "1.0.120",
4
4
  "description": "FX Transaction Form ES6 module",
5
5
  "main": "index.js",
6
6
  "types": "types/index.d.ts",
@@ -0,0 +1 @@
1
+ export declare const ConfirmModal: () => import("react/jsx-runtime").JSX.Element;
@@ -10,6 +10,12 @@ export type AppState = {
10
10
  isOpen: boolean;
11
11
  message: string | ReactNode;
12
12
  };
13
+ confirm: {
14
+ isOpen: boolean;
15
+ title: ReactNode | undefined;
16
+ description?: ReactNode | undefined;
17
+ onConfirm?: () => Promise<void> | void;
18
+ };
13
19
  };
14
20
  setIsLoading: (isLoading: boolean) => void;
15
21
  setModalError: (modal: {
@@ -22,5 +28,12 @@ export type AppState = {
22
28
  }) => void;
23
29
  closeModalError: () => void;
24
30
  closeModalSuccess: () => void;
31
+ setModalConfirm: (modal: {
32
+ isOpen: boolean;
33
+ title: ReactNode | undefined;
34
+ description?: ReactNode | undefined;
35
+ onConfirm?: () => Promise<void> | void;
36
+ }) => void;
37
+ closeModalConfirm: () => void;
25
38
  };
26
39
  export declare const useAppStore: import('zustand').UseBoundStore<import('zustand').StoreApi<AppState>>;