-
Notifications
You must be signed in to change notification settings - Fork 2
/
app.js
38 lines (30 loc) · 1.2 KB
/
app.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
'use strict';
import NukaDecorate from '../src/autoscroll';
import ProgressIcon from '../src/autoScrollProgress';
import NukaCarousel from 'nuka-carousel';
import React from 'react';
import ReactDom from 'react-dom';
import 'expose?Perf!react-addons-perf';
window.React = React;
const Nuka = NukaDecorate({
duration: 3500,
progressComponent: ProgressIcon
})(NukaCarousel);
class App extends React.Component{
render() {
return (
<div style={{width: '50%', margin: 'auto'}}>
<Nuka ref="carousel">
<img src="http://placehold.it/1000x400/eef2f4/cc181e/&text=slide1"/>
<img src="http://placehold.it/1000x400/eef2f4/cc181e/&text=slide2"/>
<img src="http://placehold.it/1000x400/eef2f4/cc181e/&text=slide3"/>
<img src="http://placehold.it/1000x400/eef2f4/cc181e/&text=slide4"/>
<img src="http://placehold.it/1000x400/eef2f4/cc181e/&text=slide5"/>
<img src="http://placehold.it/1000x400/eef2f4/cc181e/&text=slide6"/>
</Nuka>
</div>
)
}
}
const content = document.getElementById('content');
ReactDom.render(<App/>, content);