componenteszw-package 1.0.40 → 1.0.42
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/dist/Modal.d.ts +8 -8
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/Modal.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
type ModalVariant = "success" | "error" | "question" | "content";
|
|
3
|
+
type ButtonVariant = "primary" | "secondary" | "destructive";
|
|
4
|
+
type ModalAction = {
|
|
5
|
+
text: string;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
variant?: ButtonVariant;
|
|
8
|
+
};
|
|
3
9
|
type ModalProps = {
|
|
4
10
|
open: boolean;
|
|
5
11
|
onClose: () => void;
|
|
@@ -7,14 +13,8 @@ type ModalProps = {
|
|
|
7
13
|
title: string;
|
|
8
14
|
description?: string;
|
|
9
15
|
children?: React.ReactNode;
|
|
10
|
-
primaryAction?:
|
|
11
|
-
|
|
12
|
-
onClick: () => void;
|
|
13
|
-
};
|
|
14
|
-
secondaryAction?: {
|
|
15
|
-
text: string;
|
|
16
|
-
onClick: () => void;
|
|
17
|
-
};
|
|
16
|
+
primaryAction?: ModalAction;
|
|
17
|
+
secondaryAction?: ModalAction;
|
|
18
18
|
size?: "small" | "medium" | "large";
|
|
19
19
|
closeOnOverlayClick?: boolean;
|
|
20
20
|
closeOnEsc?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -37154,11 +37154,11 @@ var Kk = ({ title: e, subtitle: n, iconFile: r, loading: i = !1, state: a = "def
|
|
|
37154
37154
|
className: U("flex justify-end gap-3 px-6 py-4 bg-gray-50 border-t border-gray-100", b),
|
|
37155
37155
|
children: [c && /* @__PURE__ */ l(Qe, {
|
|
37156
37156
|
text: c.text,
|
|
37157
|
-
variant: "secondary",
|
|
37157
|
+
variant: c.variant ?? "secondary",
|
|
37158
37158
|
onClick: c.onClick
|
|
37159
37159
|
}), s && /* @__PURE__ */ l(Qe, {
|
|
37160
37160
|
text: s.text,
|
|
37161
|
-
variant: "primary",
|
|
37161
|
+
variant: s.variant ?? "primary",
|
|
37162
37162
|
onClick: s.onClick
|
|
37163
37163
|
})]
|
|
37164
37164
|
})
|