Creating the Modal Component
Follow step-by-step instructions to build a fully functional modal component.
We'll cover the following...
The task for this lesson is to create a pop-up modal when an image is clicked. A modal will display over the rest of the content on the page. This will show the user the larger version of the selected image, and we can also add additional image data, such as the image author. This modal will also link to a full-page view of the image, and we can also close it to select a new image.
Required steps
Follow the below steps:
Create a new modal component and pass to it the selected image.
Toggle the modal visibility (open/close).
Create a link to a new ...