You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
607 B
35 lines
607 B
9 years ago
|
import Carousel from 'react-slick';
|
||
|
import React from 'react';
|
||
|
import assign from 'object-assign';
|
||
|
|
||
|
var AntCarousel = React.createClass({
|
||
|
|
||
|
getDefaultProps() {
|
||
|
return {
|
||
|
dots: true,
|
||
|
arrows: false
|
||
|
};
|
||
|
},
|
||
|
|
||
|
render() {
|
||
|
var props = assign({}, this.props);
|
||
|
|
||
|
if (props.effect === 'fade') {
|
||
|
props.fade = true;
|
||
|
}
|
||
|
|
||
|
var className = 'ant-carousel';
|
||
|
if (props.vertical) {
|
||
|
className = className + ' ant-carousel-vertical';
|
||
|
}
|
||
|
|
||
|
return (
|
||
|
<div className={className}>
|
||
|
<Carousel {...props} />
|
||
|
</div>
|
||
|
);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
export default AntCarousel;
|