From 08546ed19b1a2d431310ba8793b1a2bb18eb8a4d Mon Sep 17 00:00:00 2001 From: papadopan Date: Thu, 19 Nov 2020 17:31:46 +0100 Subject: [PATCH] ui: form builder delete modal propery refactor * closes #1950 Signed-off-by: papadopan --- .../PropertyEditor/DeletePropertyModal.js | 35 +++++++++++ .../PropertyEditor/customizeField.js | 62 ++++++------------- 2 files changed, 53 insertions(+), 44 deletions(-) create mode 100644 ui/cap-react/src/components/cms/components/SchemaWizard/PropertyEditor/DeletePropertyModal.js diff --git a/ui/cap-react/src/components/cms/components/SchemaWizard/PropertyEditor/DeletePropertyModal.js b/ui/cap-react/src/components/cms/components/SchemaWizard/PropertyEditor/DeletePropertyModal.js new file mode 100644 index 0000000000..99901941d3 --- /dev/null +++ b/ui/cap-react/src/components/cms/components/SchemaWizard/PropertyEditor/DeletePropertyModal.js @@ -0,0 +1,35 @@ +import React from "react"; +import PropTypes from "prop-types"; +import Modal from "../../../../partials/Modal"; +import Button from "../../../../partials/Button"; +import Box from "grommet/components/Box"; +import Paragraph from "grommet/components/Paragraph"; + +const DeletePropertyModal = ({ show, text, onClose, onDelete }) => { + return ( + show && ( + + + + Are you sure you want to delete + {text} + + + +