@devtron-labs/devtron-fe-common-lib 0.0.40-beta-12 → 0.0.40-beta-15
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/index.js
CHANGED
|
@@ -15099,11 +15099,15 @@ var warn = "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22U
|
|
|
15099
15099
|
|
|
15100
15100
|
var DeleteDialog = function (props) {
|
|
15101
15101
|
var handleDelete = function (e) {
|
|
15102
|
-
|
|
15102
|
+
if (props.shouldStopPropagation) {
|
|
15103
|
+
e.stopPropagation();
|
|
15104
|
+
}
|
|
15103
15105
|
props.delete();
|
|
15104
15106
|
};
|
|
15105
15107
|
var handleModalClose = function (e) {
|
|
15106
|
-
|
|
15108
|
+
if (props.shouldStopPropagation) {
|
|
15109
|
+
e.stopPropagation();
|
|
15110
|
+
}
|
|
15107
15111
|
props.closeDelete();
|
|
15108
15112
|
};
|
|
15109
15113
|
return (jsxRuntime.jsxs(ConfirmationDialog, __assign({ className: "confirmation-dialog__body--w-400" }, { children: [jsxRuntime.jsx(ConfirmationDialog.Icon, { src: warn }), jsxRuntime.jsx(ConfirmationDialog.Body, __assign({ title: props.title }, { children: jsxRuntime.jsxs("div", __assign({ className: "fs-13 cn-7 lh-1-54 w-100" }, { children: [props.description ? props.description : null, props.children] })) })), jsxRuntime.jsx(ConfirmationDialog.ButtonGroup, { children: jsxRuntime.jsxs("div", __assign({ className: "flex right" }, { children: [jsxRuntime.jsx("button", __assign({ type: "button", className: "cta cancel cta-cd-delete-modal ml-16", onClick: handleModalClose, disabled: props.apiCallInProgress, "data-testid": "dialog-cancel" }, { children: "Cancel" })), jsxRuntime.jsx("button", __assign({ type: "button", className: "cta delete cta-cd-delete-modal ml-16", onClick: handleDelete, disabled: props.apiCallInProgress, "data-testid": "dialog-delete" }, { children: props.apiCallInProgress ? (jsxRuntime.jsx(Progressing, {})) : ("".concat(props.deletePrefix || '').concat(props.buttonPrimaryText ? props.buttonPrimaryText : 'Delete').concat(props.deletePostfix || '')) }))] })) })] })));
|
package/package.json
CHANGED
|
@@ -6,12 +6,18 @@ import { DeleteDialogProps } from './Types'
|
|
|
6
6
|
|
|
7
7
|
export const DeleteDialog: React.FC<DeleteDialogProps> & { Description?: React.FC<any> } = function (props) {
|
|
8
8
|
const handleDelete = (e: React.MouseEvent) => {
|
|
9
|
-
|
|
9
|
+
if (props.shouldStopPropagation) {
|
|
10
|
+
e.stopPropagation()
|
|
11
|
+
}
|
|
12
|
+
|
|
10
13
|
props.delete()
|
|
11
14
|
}
|
|
12
15
|
|
|
13
16
|
const handleModalClose = (e: React.MouseEvent) => {
|
|
14
|
-
|
|
17
|
+
if (props.shouldStopPropagation) {
|
|
18
|
+
e.stopPropagation()
|
|
19
|
+
}
|
|
20
|
+
|
|
15
21
|
props.closeDelete()
|
|
16
22
|
}
|
|
17
23
|
|