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.

45 lines
933 B

// matchMedia polyfill for
// https://github.com/WickyNilliams/enquire.js/issues/82
if (typeof window !== 'undefined') {
const matchMediaPolyfill = function matchMediaPolyfill() {
return {
matches: false,
addListener() {
},
removeListener() {
},
};
};
window.matchMedia = window.matchMedia || matchMediaPolyfill;
}
import SlickCarousel from 'react-slick';
9 years ago
import React from 'react';
export default class Carousel extends React.Component {
static defaultProps = {
dots: true,
arrows: false,
}
9 years ago
render() {
let props = { ...this.props };
9 years ago
if (props.effect === 'fade') {
props.fade = true;
props.draggable = false;
9 years ago
}
9 years ago
let className = 'ant-carousel';
9 years ago
if (props.vertical) {
className = `${className} ant-carousel-vertical`;
9 years ago
}
return (
<div className={className}>
<SlickCarousel {...props} />
9 years ago
</div>
);
}
}