Created
October 8, 2020 23:13
-
-
Save leonsomed/ef99d7aea511258f454277048c3a9c41 to your computer and use it in GitHub Desktop.
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 characters
function EditCard({title, description, onConfirm, onCancel}) { | |
return ( | |
<div> | |
<div> | |
<Icon> | |
<DocumentSVG /> | |
</Icon> | |
<h1>{title}</h1> | |
<IconButton onClick={onCancel}> | |
<CloseSVG /> | |
</IconButton> | |
</div> | |
<p>{description}</p> | |
<div> | |
<button onClick={onConfirm}>Confirm</button> | |
<button onClick={onCancel}>Cancel</button> | |
</div> | |
</div> | |
); | |
} | |
function Page() { | |
return ( | |
<React.Fragment> | |
<EditCard | |
title="Warning!" | |
description="Are you sure you want to delete your account?" | |
onConfirm={onDeleteAccount} | |
onCancel={onDismissModal} | |
/> | |
</React.Fragment> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment