Skip to content

Instantly share code, notes, and snippets.

@EthanBonsignori
Last active March 25, 2021 16:10
Show Gist options
  • Select an option

  • Save EthanBonsignori/175d7469c3672472cd23435f0b0266b9 to your computer and use it in GitHub Desktop.

Select an option

Save EthanBonsignori/175d7469c3672472cd23435f0b0266b9 to your computer and use it in GitHub Desktop.
First revision of CropModal - simple displaying of Modal and logging of the imageBase64 prop
import Modal from 'react-modal';
// For accessibility (http://reactcommunity.org/react-modal/accessibility/)
Modal.setAppElement('#root');
function CropModal(props) {
const {
isOpen,
toggleModal,
imageBase64,
} = props;
console.log(imageBase64);
return (
<Modal
className="modal"
isOpen={isOpen}
onRequestClose={toggleModal}
>
<h2>Crop Your Image</h2>
// Crop element will go here
</Modal>
);
};
export default CropModal;
@EthanBonsignori
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment