1.0.3 • Published 6 years ago
rt-carousel v1.0.3
rt-carousel
一个 react 轮播组件
Usage
import React from "react";
import Carousel from "rt-carousel";
class SimpleCarousel extends React.Component {
render() {
const settings = {
speed: 500,
autoplay: false,
dots: true,
arrows: true,
initialSlide: 0
};
return (
<Carousel {...settings}>
<div>
<h3>1</h3>
</div>
<div>
<h3>2</h3>
</div>
<div>
<h3>3</h3>
</div>
<div>
<h3>4</h3>
</div>
<div>
<h3>5</h3>
</div>
<div>
<h3>6</h3>
</div>
</Carousel>
);
}
}
API
props
Development
npm install
npm start
Example
http://localhost:8001/examples/
online example: https://wengjq.github.io/GithubPage/rt-carousel/
Test Case
npm test
npm run chrome-test
Coverage
npm run coverage
open coverage/ dir
License
rt-carousel is released under the MIT license.