carouselbox
Advanced tools
+23
-4
@@ -45,3 +45,3 @@ 'use strict'; | ||
| (0, _glamor.insertRule)('.flickity-prev-next-button .arrow { fill: #333; }'); | ||
| (0, _glamor.insertRule)('.flickity-page-dots { position: absolute; width: 100%; bottom: -25px; padding: 0; margin: 0; list-style: none; text-align: center; line-height: 1; }'); | ||
| (0, _glamor.insertRule)('.flickity-page-dots { position: absolute; width: 100%; bottom: -25px; padding: 0; margin: 0; list-style: none; text-align: center; line-height: 1; padding-bottom: 10px; }'); | ||
| (0, _glamor.insertRule)('.flickity-rtl .flickity-page-dots { direction: rtl; }'); | ||
@@ -51,2 +51,13 @@ (0, _glamor.insertRule)('.flickity-page-dots .dot { display: inline-block; width: 10px; height: 10px; margin: 0 8px; background: #333; border-radius: 50%; opacity: 0.25; cursor: pointer; }'); | ||
| var carousel = (0, _glamor.style)({ | ||
| width: '1000px', | ||
| margin: '0 auto' | ||
| }); | ||
| var carouselCell = (0, _glamor.style)({ | ||
| width: '100%', | ||
| height: '370px', | ||
| margin: '0 auto' | ||
| }); | ||
| var options = { | ||
@@ -58,3 +69,3 @@ cellAlign: 'center', | ||
| wrapAround: true, | ||
| setGallerySize: false | ||
| setGallerySize: true | ||
| }; | ||
@@ -85,6 +96,14 @@ | ||
| value: function render() { | ||
| var divCreate = _react2.default.Children.map(this.props.children, function (child) { | ||
| return _react2.default.createElement( | ||
| 'div', | ||
| { className: carouselCell }, | ||
| child | ||
| ); | ||
| }); | ||
| return _react2.default.createElement( | ||
| 'div', | ||
| { ref: 'carousel', options: options }, | ||
| this.props.children | ||
| { ref: 'carousel', className: carousel, options: options }, | ||
| divCreate | ||
| ); | ||
@@ -91,0 +110,0 @@ } |
+2
-4
| { | ||
| "name": "carouselbox", | ||
| "version": "1.0.14", | ||
| "version": "1.0.15", | ||
| "description": "React Carousel Plugin based from Flickity", | ||
@@ -29,5 +29,3 @@ "main": "./lib/index.js", | ||
| }, | ||
| "peerDependencies": { | ||
| "react": "0.13.3" | ||
| } | ||
| "peerDependencies": {} | ||
| } |
8588
5.08%2
-33.33%93
20.78%