diff --git a/README.md b/README.md index 89fe010..72a8de5 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,7 @@ class App extends Component { | **disableNavIfEdgeVisible** (disabled if `infinite` prop enabled) | boolean | `true` | Disable carousel forward nav if last slide is visible / Disable carousel backward nav if first slide is visible | | **disableNavIfEdgeActive** | boolean | `true` | Disable carousel forward nav if activeSlideIndex === lastSlideIndex / Disable carousel backward nav if activeSlideIndex === 0 | | **dotsNav (experimental)** (disabled if `infinite` prop enabled) | object | `{}` | Props for carousel dots. includes `show` (boolean) for toggle dots nav visibility, activeClassName (className for active dot) and DOM props for all dots nav buttons | +| **dotsNavWrapperProps** | object | `{}` | DOM Props for dots nav wrapper div | ## Demo diff --git a/package.json b/package.json index 96d6dd6..b16bf47 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-simply-carousel", - "version": "5.1.0", + "version": "5.1.1", "description": "Simple react.js carousel component", "main": "dist/index.js", "files": [ diff --git a/src/index.jsx b/src/index.jsx index bdf4ba5..feaf665 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -93,6 +93,7 @@ function ReactSimplyCarousel({ responsiveProps, ...props }) { disableNavIfEdgeVisible, disableNavIfEdgeActive, dotsNav, + dotsNavWrapperProps, } = windowWidth ? { ...propsByWindowWidth, @@ -741,35 +742,38 @@ function ReactSimplyCarousel({ responsiveProps, ...props }) { )} - {!infinite && - !!showDotsNav && - Array.from({ - length: Math.ceil(slidesItems.length / itemsToScroll), - }).map((_item, index) => ( -