diff --git a/public/css/main.css b/public/css/main.css index 2080702b83f063a7c644a4a3f55d196a25263549..6e99cb596d0bf730ecd39374c5e12010522463db 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -2935,7 +2935,7 @@ button.active { } */ .react-confirm-alert-body { - color: var(--white-90) !important; + color: var(--main-black60) !important; background: var(--input-background) !important; border-radius: unset !important; } diff --git a/src/components/form/AddForm.js b/src/components/form/AddForm.js index b1ca4c6fe9505b3d72ab988dee6aeb9f5b9f95a9..0acb7a0ca21611e58a07864dcdc68c03f43b216d 100644 --- a/src/components/form/AddForm.js +++ b/src/components/form/AddForm.js @@ -146,10 +146,17 @@ class AddForm extends Component { }; removeElement = (index) => { - // console.log(this.state.formElements) + // console.log(this.state.formElements); + confirmAlert({ - title: LANG.CONFIRM_TO_REMOVE, - message: LANG.ARE_YOU_SURE_YOU_WANT_TO_DO_THIS, + title: + this.state.formElements[index] === "heading" + ? LANG.HEADING_REMOVAL_WARNING + : LANG.CONFIRM_TO_REMOVE, + message: + this.state.formElements[index] === "heading" + ? LANG.CONFIRM_TO_REMOVE_2 + : LANG.ARE_YOU_SURE_YOU_WANT_TO_DO_THIS, buttons: [ { label: LANG.REMOVE, diff --git a/src/constants/LangConstants.ts b/src/constants/LangConstants.ts index 5d3a4c3470ac4bf327e1a077724de3e13c8dca48..42189d3f6a686baaabcbcbf3adba198c6a188960 100644 --- a/src/constants/LangConstants.ts +++ b/src/constants/LangConstants.ts @@ -52,4 +52,6 @@ export const LANG = { CANCEL: "Cancel", REMOVE: "Remove", CONFIRM_TO_REMOVE: "Confirm to remove", + HEADING_REMOVAL_WARNING: "Are you sure deleting the header?", + CONFIRM_TO_REMOVE_2: "This action will move the question section to the general header category.", };