react-carousel
Advanced tools
Comparing version
@@ -6,2 +6,3 @@ { | ||
"devDependencies": { | ||
"babel-core": "^6.26.0", | ||
"babel-loader": "^7.0.0", | ||
@@ -8,0 +9,0 @@ "babel-plugin-transform-class-properties": "^6.24.1", |
@@ -111,2 +111,6 @@ 'use strict'; | ||
if (!isVisible) { | ||
return null; | ||
} | ||
return _react2.default.createElement( | ||
@@ -118,3 +122,3 @@ 'li', | ||
boxSizing: 'border-box', | ||
display: isVisible ? 'flex' : 'none', | ||
display: 'flex', | ||
listStyleType: 'none', | ||
@@ -121,0 +125,0 @@ marginRight: isLastAmongVisible ? 0 : _this.props.itemMargin, |
@@ -1,1 +0,1 @@ | ||
{"description":"React carousel.","devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-plugin-transform-flow-strip-types":"^6.22.0","babel-preset-es2015":"^6.24.1","babel-preset-react":"^6.24.1","babel-preset-stage-0":"^6.24.1","chai":"^4.1.2","eslint":"^4.11.0","eslint-config-canonical":"^9.3.1","flow-bin":"^0.59.0","flow-copy-source":"^1.2.1","mocha":"^4.0.1","react":"^16.1.1","react-dom":"^16.1.1","semantic-release":"^8.2.0","sinon":"^4.1.2","sinon-chai":"^2.14.0"},"engines":{"node":">4"},"keywords":["react","carousel"],"license":"BSD-3-Clause","main":"./dist/Carousel.js","name":"react-carousel","repository":{"type":"git","url":"git@github.com:gajus/react-carousel.git"},"scripts":{"build":"rm -fr ./dist && NODE_ENV=production babel ./src --source-maps --copy-files --out-dir ./dist && flow-copy-source src dist","lint":"eslint ./test ./src ./demo/src && flow","test":"mocha --compilers js:babel-core/register"},"version":"4.2.4","dependencies":{"debounce":"^1.1.0","range":"0.0.3"}} | ||
{"description":"React carousel.","devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-plugin-transform-flow-strip-types":"^6.22.0","babel-preset-es2015":"^6.24.1","babel-preset-react":"^6.24.1","babel-preset-stage-0":"^6.24.1","chai":"^4.1.2","eslint":"^4.11.0","eslint-config-canonical":"^9.3.1","flow-bin":"^0.59.0","flow-copy-source":"^1.2.1","mocha":"^4.0.1","react":"^16.1.1","react-dom":"^16.1.1","semantic-release":"^8.2.0","sinon":"^4.1.2","sinon-chai":"^2.14.0"},"engines":{"node":">4"},"keywords":["react","carousel"],"license":"BSD-3-Clause","main":"./dist/Carousel.js","name":"react-carousel","repository":{"type":"git","url":"git@github.com:gajus/react-carousel.git"},"scripts":{"build":"rm -fr ./dist && NODE_ENV=production babel ./src --source-maps --copy-files --out-dir ./dist && flow-copy-source src dist","lint":"eslint ./test ./src ./demo/src && flow","test":"mocha --compilers js:babel-core/register"},"version":"4.3.0","dependencies":{"debounce":"^1.1.0","range":"0.0.3"}} |
@@ -40,7 +40,6 @@ # react-carousel | ||
```bash | ||
git clone git@github.com:applaudience/react-carousel.git | ||
cd ./react-carousel/example | ||
git clone https://github.com/gajus/react-carousel.git | ||
cd ./react-carousel/demo | ||
npm install | ||
npm start | ||
``` | ||
@@ -47,0 +46,0 @@ |
@@ -166,3 +166,3 @@ // @flow | ||
getItemElement = (item: React$Element<any>, key: string, index: number, visibleItemCount: number): React$Element<any> => { | ||
getItemElement = (item: React$Element<any>, key: string, index: number, visibleItemCount: number): React$Element<any> | null => { | ||
const visibleItemIndeces = range(this.state.firstVisibleIndex, visibleItemCount + this.state.firstVisibleIndex); | ||
@@ -172,2 +172,6 @@ const isVisible = visibleItemIndeces.includes(index); | ||
if (!isVisible) { | ||
return null; | ||
} | ||
return <li | ||
@@ -177,3 +181,3 @@ key={key} | ||
boxSizing: 'border-box', | ||
display: isVisible ? 'flex' : 'none', | ||
display: 'flex', | ||
listStyleType: 'none', | ||
@@ -180,0 +184,0 @@ marginRight: isLastAmongVisible ? 0 : this.props.itemMargin, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
47628
0.4%536
1.13%86
-1.15%