Created
July 13, 2020 10:13
-
-
Save Aslemammad/ed822e5df79ec50d0fa6f2568aee9b3d to your computer and use it in GitHub Desktop.
This file contains 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 characters
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> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment