this.toggleConfirmationDialog()}
onConfirm={() => {
- this.executeSript(this.selectedScript);
+ this.executeScript(this.selectedScript);
this.toggleConfirmationDialog();
}}
- >
-
- {`Do you want to run script "${this.selectedScript.title}" on "${this.selectedScript.className}" object "${this.selectedScript.objectId}"?`}
-
-
+ />
);
}
diff --git a/src/components/ScriptConfirmationModal/ScriptConfirmationModal.react.js b/src/components/ScriptConfirmationModal/ScriptConfirmationModal.react.js
new file mode 100644
index 0000000000..a15643d827
--- /dev/null
+++ b/src/components/ScriptConfirmationModal/ScriptConfirmationModal.react.js
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2016-present, Parse, LLC
+ * All rights reserved.
+ *
+ * This source code is licensed under the license found in the LICENSE file in
+ * the root directory of this source tree.
+ */
+import React from 'react';
+import Modal from 'components/Modal/Modal.react';
+import labelStyles from 'components/Label/Label.scss';
+import browserCellStyles from 'components/BrowserCell/BrowserCell.scss';
+
+/**
+ * Confirmation dialog for executing scripts
+ */
+export default function ScriptConfirmationModal({ script, onConfirm, onCancel }) {
+ if (!script) {
+ return null;
+ }
+
+ return (
+