-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.js
48 lines (43 loc) · 1.68 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import React, { PropTypes, Component } from 'react';
import ReactDOM from 'react-dom';
import { Carousel } from 'react-responsive-carousel';
// general styles
import 'style!css!react-responsive-carousel/lib/styles/main.css';
// carousel styles
import 'style!css!react-responsive-carousel/lib/styles/carousel.css';
class DemoCarousel extends Component {
render() {
return (
<Carousel showArrows={true}>
<div>
<img src="http://lorempixel.com/900/500/sports/1/" />
<p className="legend">Legend 1</p>
</div>
<div>
<img src="http://lorempixel.com/900/500/sports/2/" />
<p className="legend">Legend 2</p>
</div>
<div>
<img src="http://lorempixel.com/900/500/sports/3/" />
<p className="legend">Legend 3</p>
</div>
<div>
<img src="http://lorempixel.com/900/500/sports/4/" />
<p className="legend">Legend 4</p>
</div>
<div>
<img src="http://lorempixel.com/900/500/sports/5/" />
<p className="legend">Legend 5</p>
</div>
<div>
<img src="http://lorempixel.com/900/500/sports/6/" />
<p className="legend">Legend 6</p>
</div>
</Carousel>
);
}
}
ReactDOM.render(<DemoCarousel />, document.querySelector('.demo-carousel'));
// Don't forget to include the css in your page
// <link rel="stylesheet" href="carousel.css"/>
// Begin DemoSliderControls