@JimTK16
Posted
Hi Daniel,
Good job on this challenge!
For CSS, in mobile view, I can see a layout shift when I click the Share button so you might want to adjust the styles to fix it.
As with JS, i think you did a good job too. Something to consider is to add a feature that the user can also close the popup when they click outside the popup box.
Jim
Marked as helpful
@danielmrz-dev
Posted
Yeah, I tried my best, but with my current JS skills, that was as far as I could go. But I'm taking courses to learn how to improve it 😁
@JimTK16
@JimTK16
Posted
@danielmrz-dev That's great to hear. What are the courses that you're taking, just curious, as I want to improve my JS too.
Also, the feature that I talked about above, is quite simple to implement. I added an event listener to the container to listen to 'click' event, and it will perform the close action (like set the display of the popup to none etc.). Another event listener also added to the popup box to stop the Propagation, so that the popup won't be closed if the user click on the popup itself. The result is that the popup only closes when the user click outside its area. Link to my code for reference: https://github.com/JimTK16/Article-Preview-Component.
Jim
Marked as helpful