UNPKG

react-multi-carousel-18

Version:

Production-ready, lightweight fully customizable React carousel component that rocks supports multiple items and SSR(Server-side rendering) with typescript.

1 lines 1.11 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.RightArrow=exports.LeftArrow=void 0;const React=require("react"),LeftArrow=({customLeftArrow,getState,previous,disabled,rtl})=>{if(customLeftArrow)return React.cloneElement(customLeftArrow,{onClick:()=>previous(),carouselState:getState(),disabled:disabled,rtl:rtl});customLeftArrow=rtl?"rtl":"";return React.createElement("button",{"aria-label":"Go to previous slide",className:"react-multiple-carousel__arrow react-multiple-carousel__arrow--left "+customLeftArrow,onClick:()=>previous(),type:"button",disabled:disabled})},RightArrow=(exports.LeftArrow=LeftArrow,({customRightArrow,getState,next,disabled,rtl})=>{if(customRightArrow)return React.cloneElement(customRightArrow,{onClick:()=>next(),carouselState:getState(),disabled:disabled,rtl:rtl});customRightArrow=rtl?"rtl":"";return React.createElement("button",{"aria-label":"Go to next slide",className:"react-multiple-carousel__arrow react-multiple-carousel__arrow--right "+customRightArrow,onClick:()=>next(),type:"button",disabled:disabled})});exports.RightArrow=RightArrow;