@plastic-js/tsumiki 0.1.25 → 0.1.27
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.
|
@@ -12,7 +12,6 @@ var messageBodyClass = css({
|
|
|
12
12
|
padding: "var(--tsu-spacing-sm) 0"
|
|
13
13
|
});
|
|
14
14
|
var DEFAULT_PROPS = {
|
|
15
|
-
mode: "modal",
|
|
16
15
|
confirmText: "Confirm",
|
|
17
16
|
cancelText: "Cancel",
|
|
18
17
|
danger: false,
|
|
@@ -36,10 +35,7 @@ function ConfirmDialog(props) {
|
|
|
36
35
|
const handleConfirm = () => {
|
|
37
36
|
local.onConfirm?.();
|
|
38
37
|
};
|
|
39
|
-
return jsx(Dialog, mergeProps({
|
|
40
|
-
get mode() {
|
|
41
|
-
return local.mode;
|
|
42
|
-
},
|
|
38
|
+
return jsx(Dialog, mergeProps(() => local.mode ? { mode: local.mode } : {}, {
|
|
43
39
|
get cancelText() {
|
|
44
40
|
return local.cancelText;
|
|
45
41
|
},
|
|
@@ -113,10 +109,7 @@ function ensureInit() {
|
|
|
113
109
|
renderApp(container, () => {
|
|
114
110
|
const s = state();
|
|
115
111
|
if (!s) return null;
|
|
116
|
-
return jsx(Dialog, mergeProps({
|
|
117
|
-
get mode() {
|
|
118
|
-
return s.mode || "modal";
|
|
119
|
-
},
|
|
112
|
+
return jsx(Dialog, mergeProps(() => s.mode ? { mode: s.mode } : {}, {
|
|
120
113
|
get open() {
|
|
121
114
|
return s.open;
|
|
122
115
|
},
|