Skip to content

Instantly share code, notes, and snippets.

@charisschomba
Created February 20, 2019 09:07
Show Gist options
  • Save charisschomba/8149ddae41246d2791d5f7fd0b2e2dea to your computer and use it in GitHub Desktop.
Save charisschomba/8149ddae41246d2791d5f7fd0b2e2dea to your computer and use it in GitHub Desktop.
import React from 'react';
import { Button, Modal } from 'semantic-ui-react';
import PropTypes from 'prop-types';
const DeleteUser = ({ closeModal, open, handleDelete }) => {
return (
<div>
<Modal size="mini" open={open} onClose={closeModal} className="show">
<Modal.Header>Delete user account</Modal.Header>
<Modal.Content>
<p>Are you sure you want to delete this account ?</p>
</Modal.Content>
<Modal.Actions>
<Button negative onClick={closeModal}>
No
</Button>
<Button positive onClick={handleDelete}>
Yes
</Button>
</Modal.Actions>
</Modal>
</div>
);
};
DeleteUser.propTypes = {
closeModal: PropTypes.func,
handleDelete: PropTypes.func,
open: PropTypes.bool,
};
export default DeleteUser;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment