inferno-carousel
Version:
Carousel component for InfernoJS.
1 lines • 980 B
JavaScript
;var _inferno=require("inferno");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;/** @format */function InfernoCarousel(a){var b=this;this.props=a,this.componentDidMount=function(){b.stop=window.jscarousel(b.carouselContainer,{noClone:!0,animationSpeed:b.props.animationSpeed,itemDuration:b.props.itemDuration,swipeThreshold:b.props.swipeThreshold})},this.componenWillUnmount=function(){b.stop&&b.stop()},this.render=function(){return(0,_inferno.createVNode)(1,"div",b.props.className,[(0,_inferno.createVNode)(1,"div",null,b.props.children[b.props.children.length-1],0),b.props.children.map(function(a,b){return(0,_inferno.createVNode)(1,"div",null,a,0,null,b)}),(0,_inferno.createVNode)(1,"div",null,b.props.children[0],0)],0,null,null,function(a){b.carouselContainer=a})}}InfernoCarousel.prototype=_inferno.Component.prototype,InfernoCarousel.prototype.constructor=InfernoCarousel;var _default=InfernoCarousel;exports.default=_default;