Skip to content

Instantly share code, notes, and snippets.

@Aslemammad
Created July 13, 2020 11:22
Show Gist options
  • Save Aslemammad/0535e9ded78fd27d3f263d0aa87e9862 to your computer and use it in GitHub Desktop.
Save Aslemammad/0535e9ded78fd27d3f263d0aa87e9862 to your computer and use it in GitHub Desktop.
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