Using the code in this directory as a starting point, create a confirmation modal that asks the user to confirm their intent after clicking the Cancel button.
- When the user mouses over the Cancel button, the mouse pointer should indicate that it is a clickable link.
- The modal window should include the following:
- Text:
Are you sure you want to cancel your subscription?
- No button on the left
- Yes - Cancel button on the right
- Text:
- When the user clicks the No button, the modal should disappear.
- When the user clicks the Yes - Cancel button:
- The modal's content should be updated to display the text
Subscription successfully cancelled!
. This modal should close after 2 seconds. - The cancel button on the page should be replaced with the text
cancelled
.
- The modal's content should be updated to display the text
- All code should be written in ES6 JavaScript.
- You may use third-party JavaScript or CSS libraries to complete this task, but it is not required.
- You may edit any of the files as necessary to complete the task, but it is not required.
- Documentation and maintainability is a plus.
We respect your time and would prefer you not spend more than 3-5 hours. Feel free to include code comments to indicate any features you don't have time to implement.