Tealthy is a comprehensive online platform designed to bridge the gap between patients and healthcare providers, offering seamless access to medical services and resources. Our platform facilitates remote doctor-patient consultations, appointment scheduling, and medical assistance, all in one convenient and user-friendly interface.
In this task, you will implement a carousel component for the Tealthy frontend. The carousel should display a rotating set of banners, with each banner being an instance of the ImageBanner component located at frontend/src/components/Banners/ImageBanner.jsx.
Requirements
Carousel Component: Create a scrollable carousel component that displays a rotating set of banners.
ImageBanner Integration: Use the ImageBanner component to render each banner in the carousel.
Horizontal Scroll: Ensure that the carousel scrolls horizontally to navigate between banners.
Navigation Controls:
Implement optional previous and next buttons for manual navigation through the banners. This should be controlled by a prop.
Implement optional dots for navigation, where each dot represents a banner. This should also be controlled by a prop.
Responsiveness: Ensure that the carousel is responsive and works well on different screen sizes.
Props:
The carousel component should accept a banners prop, which is an array of objects representing each banner. Each object should have src, alt, and text properties.
Implement props for controlling the visibility of previous and next buttons (showButtons) and dots (showDots).
Implementation
Create a new component for the carousel (Carousel.jsx).
Use the ImageBanner component to render each banner inside the carousel.
Implement horizontal scrolling for the carousel.
Add optional props for controlling the visibility of previous and next buttons and dots.
Overview
In this task, you will implement a carousel component for the Tealthy frontend. The carousel should display a rotating set of banners, with each banner being an instance of the
ImageBanner
component located atfrontend/src/components/Banners/ImageBanner.jsx
.Requirements
ImageBanner
component to render each banner in the carousel.banners
prop, which is an array of objects representing each banner. Each object should havesrc
,alt
, andtext
properties.showButtons
) and dots (showDots
).Implementation
Carousel.jsx
).ImageBanner
component to render each banner inside the carousel.Example Usage