@@ -58,7 +58,7 @@ class Carousel extends React.Component {
5858 const isOutOfRange = firstItem + itemsToShow > lastIndex ;
5959 if ( isOutOfRange ) {
6060 // we are out of boundaries, go "back" to last item of the list (respect itemsToShow)
61- this . goTo ( children . length - itemsToShow )
61+ this . goTo ( children . length - itemsToShow ) ;
6262 }
6363 }
6464 }
@@ -265,8 +265,6 @@ class Carousel extends React.Component {
265265 return asObj ;
266266 } ;
267267
268-
269-
270268 onNextStart = ( ) => {
271269 const { onNextStart } = this . props ;
272270 const { firstItem } = this . state ;
@@ -477,17 +475,24 @@ class Carousel extends React.Component {
477475 className = { `${ cssPrefix ( "carousel-wrapper" ) } ${ className } ` }
478476 style = { style }
479477 >
480- < StyledCarousel className = { cssPrefix ( "carousel" ) } size = { { height : rootHeight } } >
478+ < StyledCarousel
479+ className = { cssPrefix ( "carousel" ) }
480+ size = { { height : rootHeight } }
481+ >
481482 < Only when = { showArrows } >
482483 { renderArrow ? (
483- renderArrow ( { type : consts . PREV , onClick : this . onPrevStart , isEdge : ! canSlidePrev } )
484+ renderArrow ( {
485+ type : consts . PREV ,
486+ onClick : this . onPrevStart ,
487+ isEdge : ! canSlidePrev
488+ } )
484489 ) : (
485- < Arrow
486- onClick = { this . onPrevStart }
487- direction = { verticalMode ? Arrow . up : Arrow . left }
488- disabled = { disabledPrevArrow }
489- />
490- ) }
490+ < Arrow
491+ onClick = { this . onPrevStart }
492+ direction = { verticalMode ? Arrow . up : Arrow . left }
493+ disabled = { disabledPrevArrow }
494+ />
495+ ) }
491496 </ Only >
492497 < SliderContainer
493498 className = { cssPrefix ( "slider-container" ) }
@@ -524,14 +529,18 @@ class Carousel extends React.Component {
524529 </ SliderContainer >
525530 < Only when = { showArrows } >
526531 { renderArrow ? (
527- renderArrow ( { type : consts . NEXT , onClick : this . onNextStart , isEdge : ! canSlideNext } )
532+ renderArrow ( {
533+ type : consts . NEXT ,
534+ onClick : this . onNextStart ,
535+ isEdge : ! canSlideNext
536+ } )
528537 ) : (
529- < Arrow
530- onClick = { this . onNextStart }
531- direction = { verticalMode ? Arrow . down : Arrow . right }
532- disabled = { disabledNextArrow }
533- />
534- ) }
538+ < Arrow
539+ onClick = { this . onNextStart }
540+ direction = { verticalMode ? Arrow . down : Arrow . right }
541+ disabled = { disabledNextArrow }
542+ />
543+ ) }
535544 </ Only >
536545 </ StyledCarousel >
537546 < Only when = { pagination } >
@@ -542,12 +551,12 @@ class Carousel extends React.Component {
542551 onClick : this . onIndicatorClick
543552 } )
544553 ) : (
545- < Pagination
546- numOfPages = { numOfPages }
547- activePage = { activePage }
548- onClick = { this . onIndicatorClick }
549- />
550- ) }
554+ < Pagination
555+ numOfPages = { numOfPages }
556+ activePage = { activePage }
557+ onClick = { this . onIndicatorClick }
558+ />
559+ ) }
551560 </ Only >
552561 </ CarouselWrapper >
553562 ) ;
@@ -667,10 +676,10 @@ Carousel.propTypes = {
667676 /** Enable or disable mouse swipe */
668677 enableMouseSwipe : PropTypes . bool ,
669678
670- /** Prevent page scroll on touchmove.
679+ /** Prevent page scroll on touchmove.
671680 * Use this to stop the browser from scrolling while a user swipes.
672681 * More details: https://github.com/FormidableLabs/react-swipeable#preventdefaulttouchmoveevent-details
673- */
682+ */
674683 preventDefaultTouchmoveEvent : PropTypes . bool ,
675684
676685 // auto play
@@ -681,7 +690,7 @@ Carousel.propTypes = {
681690 autoPlaySpeed : PropTypes . number ,
682691
683692 // callbacks
684- /** A callback for the change of an item
693+ /** A callback for the change of an item
685694 * - onChange(currentItemObject, currentPageIndex) => {} */
686695 onChange : PropTypes . func ,
687696
0 commit comments