corousal in react

Solutions on MaxInterview for corousal in react by the best coders in the world

showing results for - "corousal in react"
Emma
31 Jun 2019
1import React from 'react';
2import 'bootstrap/dist/css/bootstrap.css';
3import Carousel from 'react-bootstrap/Carousel';
4
5export default function Corousal() {
6const images = ["slide-1.jpg","slide-2.jpg"]
7
8const corousalComponent = images.map((image,i) => {
9return(
10		<Carousel.Item interval={1500}>
11			<img className="img-slide " src={require("../images/"+image).default} alt="slide"/>
12		</Carousel.Item>)
13})
14return (
15	<div style={{ display: 'block'}}>
16	<Carousel>
17		{corousalComponent}
18	</Carousel>
19	</div>
20);
21}