Created
July 13, 2020 11:22
-
-
Save Aslemammad/0535e9ded78fd27d3f263d0aa87e9862 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 { Reoverlay } from 'reoverlay'; | |
const PostPage = () => { | |
const deletePost = () => { | |
// showModal("Component name in config", props) | |
Reoverlay.showModal("ConfirmModal", { | |
confirmText: "Are you sure you want to delete this post", | |
onConfirm: () => { | |
axios.delete(...) | |
} | |
}) | |
} | |
return ( | |
<div> | |
<p>This is your post page</p> | |
<button onClick={deletePost}>Delete this post</button> | |
</div> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment