react-carousel
Advanced tools
Comparing version 4.1.1 to 4.2.0
@@ -31,2 +31,3 @@ import React from 'react'; | ||
display: 'block', | ||
flexGrow: 1, | ||
fontSize: '32px', | ||
@@ -47,2 +48,3 @@ height: '100px', | ||
firstVisibleIndex={this.state.visibleIndex} | ||
itemMargin={10} | ||
itemWidth={50} | ||
@@ -49,0 +51,0 @@ onItemScroll={this.handleScrollToIndex} |
@@ -111,2 +111,3 @@ 'use strict'; | ||
var isVisible = visibleItemIndeces.includes(index); | ||
var isLastAmongVisible = visibleItemIndeces.length === visibleItemIndeces.indexOf(index) + 1; | ||
@@ -121,3 +122,3 @@ return _react2.default.createElement( | ||
listStyleType: 'none', | ||
marginRight: _this.props.itemMargin, | ||
marginRight: isLastAmongVisible ? 0 : _this.props.itemMargin, | ||
width: _this.props.itemWidth | ||
@@ -197,4 +198,3 @@ } | ||
var navigationButtonPreviousStyle = _extends({}, navigationButtonStyle, { | ||
display: prevButtonVisible ? 'flex' : 'none', | ||
marginRight: itemMargin | ||
display: prevButtonVisible ? 'flex' : 'none' | ||
}); | ||
@@ -265,3 +265,3 @@ | ||
firstVisibleIndex: 0, | ||
itemMargin: 1, | ||
itemMargin: 0, | ||
itemWidth: 50, | ||
@@ -268,0 +268,0 @@ onItemScroll: function onItemScroll() {}, |
@@ -41,3 +41,3 @@ { | ||
}, | ||
"version": "4.1.1", | ||
"version": "4.2.0", | ||
"dependencies": { | ||
@@ -48,2 +48,2 @@ "debounce": "^1.0.2", | ||
} | ||
} | ||
} |
@@ -105,3 +105,3 @@ // @flow | ||
firstVisibleIndex: 0, | ||
itemMargin: 1, | ||
itemMargin: 0, | ||
itemWidth: 50, | ||
@@ -164,2 +164,3 @@ onItemScroll: () => {}, | ||
const isVisible = visibleItemIndeces.includes(index); | ||
const isLastAmongVisible = visibleItemIndeces.length === visibleItemIndeces.indexOf(index) + 1; | ||
@@ -172,3 +173,3 @@ return <li | ||
listStyleType: 'none', | ||
marginRight: this.props.itemMargin, | ||
marginRight: isLastAmongVisible ? 0 : this.props.itemMargin, | ||
width: this.props.itemWidth | ||
@@ -213,4 +214,3 @@ }} | ||
...navigationButtonStyle, | ||
display: prevButtonVisible ? 'flex' : 'none', | ||
marginRight: itemMargin | ||
display: prevButtonVisible ? 'flex' : 'none' | ||
}; | ||
@@ -217,0 +217,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
47387
525