@floegence/floe-webapp-core 0.4.0 → 0.5.0
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.
|
@@ -19,7 +19,10 @@ export interface ConfirmDialogProps {
|
|
|
19
19
|
open: boolean;
|
|
20
20
|
onOpenChange: (open: boolean) => void;
|
|
21
21
|
title: string;
|
|
22
|
+
/** Description displayed under title (header area). Use children for content area. */
|
|
22
23
|
description?: string;
|
|
24
|
+
/** Custom content in the dialog body. If not provided, an empty placeholder is used. */
|
|
25
|
+
children?: JSX.Element;
|
|
23
26
|
confirmText?: string;
|
|
24
27
|
cancelText?: string;
|
|
25
28
|
variant?: 'default' | 'destructive';
|
package/dist/index22.js
CHANGED
|
@@ -132,6 +132,9 @@ function Q(e) {
|
|
|
132
132
|
return [o(y, {
|
|
133
133
|
variant: "ghost",
|
|
134
134
|
onClick: () => e.onOpenChange(!1),
|
|
135
|
+
get disabled() {
|
|
136
|
+
return e.loading;
|
|
137
|
+
},
|
|
135
138
|
get children() {
|
|
136
139
|
return e.cancelText ?? a.config.strings.confirmDialog.cancel;
|
|
137
140
|
}
|
|
@@ -151,7 +154,7 @@ function Q(e) {
|
|
|
151
154
|
})];
|
|
152
155
|
},
|
|
153
156
|
get children() {
|
|
154
|
-
return B();
|
|
157
|
+
return e.children ?? B();
|
|
155
158
|
}
|
|
156
159
|
});
|
|
157
160
|
}
|