Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-carousel

Package Overview
Dependencies
Maintainers
2
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-carousel - npm Package Compare versions

Comparing version 4.1.1 to 4.2.0

2

demo/src/index.js

@@ -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}

8

dist/Carousel.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc