ant-design/components/carousel/index.jsx
2015-08-20 11:34:43 +08:00

33 lines
608 B
JavaScript

import Carousel from 'react-slick2';
import React from 'react';
import assign from 'object-assign';
const AntCarousel = React.createClass({
getDefaultProps() {
return {
dots: true,
arrows: false
};
},
render() {
let props = assign({}, this.props);
if (props.effect === 'fade') {
props.fade = true;
}
let className = 'ant-carousel';
if (props.vertical) {
className = className + ' ant-carousel-vertical';
}
return (
<div className={className}>
<Carousel {...props} />
</div>
);
}
});
export default AntCarousel;