Overview
In the fast-paced world of digital content, visual presentation is key. We need to develop a foundational component for an internal content management system: a simple image gallery. This gallery will allow users to browse thumbnails and view a larger version of an image along with its details in a modal overlay, enhancing the user experience for content review.
What you need to do / Task
Your goal is to build a functional image gallery component using React.
- Display Thumbnails: Render a grid or list of image thumbnails using the provided mock data. Each thumbnail should be visually distinct and represent an individual image.
- Open Modal on Click: Implement functionality such that clicking on any image thumbnail opens a modal dialog.
- Modal Content: The modal dialog should display the full-size version of the clicked image, along with its
title and description.
- Close Modal: Provide a clear way to close the modal, such as a close button or by clicking on the modal overlay.
UI/UX expectations
- Gallery Layout: The thumbnails should be presented in a grid-like structure, allowing for easy scanning.
- Clickable Thumbnails: Each thumbnail should be clearly identifiable as clickable.
- Modal Presentation: The modal should appear centered on the screen, overlaying the main content, and dimming the background slightly to focus user attention.
- Close Mechanism: A visible "X" button or similar icon should be present within the modal, and clicking outside the modal content (on the overlay) should also close it.
Acceptance criteria
- The application successfully renders a collection of image thumbnails based on the provided data.
- Clicking any thumbnail displays a modal window.
- The modal window correctly shows the full-size image corresponding to the clicked thumbnail.
- The modal window displays the
title and description of the selected image.
- The modal can be closed by clicking a dedicated close button.
- The modal can be closed by clicking on the dimmed background overlay.