Created
July 13, 2020 10:13
-
-
Save Aslemammad/ed822e5df79ec50d0fa6f2568aee9b3d to your computer and use it in GitHub Desktop.
Revisions
-
Aslemammad created this gist
Jul 13, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ import React from 'react'; import { ModalWrapper, Reoverlay } from 'reoverlay'; // reoverlay css import 'reoverlay/lib/ModalWrapper.css'; const ConfirmModal = ({ confirmText, onConfirm }) => { const closeModal = () => { Reoverlay.hideModal(); } return ( <ModalWrapper> {confirmText} <button onClick={onConfirm}>Yes</button> <button onClick={closeModal}>No</button> </ModalWrapper> ) }