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

react-multi-carousel

Package Overview
Dependencies
Maintainers
1
Versions
133
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-multi-carousel - npm Package Compare versions

Comparing version 1.0.14 to 1.0.15

146

lib/Carousel.d.ts
import * as React from "react";
import { CarouselProps } from "./types";
declare const Carousel: {
({ children, ...rest }: CarouselProps): React.ReactNode;
displayName: string;
__docgenInfo: {
"description": string;
"displayName": string;
"props": {
"responsive": {
"defaultValue": null;
"description": string;
"name": string;
"required": boolean;
"type": {
"name": string;
};
};
"deviceType": {
"defaultValue": null;
"description": string;
"name": string;
"required": boolean;
"type": {
"name": string;
};
};
"forSSR": {
"defaultValue": null;
"description": string;
"name": string;
"required": boolean;
"type": {
"name": string;
};
};
"slidesToSlide": {
"defaultValue": null;
"description": string;
"name": string;
"required": boolean;
"type": {
"name": string;
};
};
"disableDrag": {
"defaultValue": null;
"description": string;
"name": string;
"required": boolean;
"type": {
"name": string;
};
};
"removeArrow": {
"defaultValue": null;
"description": string;
"name": string;
"required": boolean;
"type": {
"name": string;
};
};
"disableSwipeOnMobile": {
"defaultValue": null;
"description": string;
"name": string;
"required": boolean;
"type": {
"name": string;
};
};
"removeArrowOnDeviceType": {
"defaultValue": null;
"description": string;
"name": string;
"required": boolean;
"type": {
"name": string;
};
};
"customLeftArrow": {
"defaultValue": null;
"description": string;
"name": string;
"required": boolean;
"type": {
"name": string;
};
};
"customRightArrow": {
"defaultValue": null;
"description": string;
"name": string;
"required": boolean;
"type": {
"name": string;
};
};
"infinite": {
"defaultValue": null;
"description": string;
"name": string;
"required": boolean;
"type": {
"name": string;
};
};
"contentClassName": {
"defaultValue": null;
"description": string;
"name": string;
"required": boolean;
"type": {
"name": string;
};
};
"itemClassName": {
"defaultValue": null;
"description": string;
"name": string;
"required": boolean;
"type": {
"name": string;
};
};
"containerClassName": {
"defaultValue": null;
"description": string;
"name": string;
"required": boolean;
"type": {
"name": string;
};
};
"transition": {
"defaultValue": null;
"description": string;
"name": string;
"required": boolean;
"type": {
"name": string;
};
};
};
};
};
declare const Carousel: ({ children, ...rest }: CarouselProps) => React.ReactNode;
export default Carousel;

15

lib/Carousel.js

@@ -113,12 +113,11 @@ "use strict";

onResize() {
const { itemWidth } = this.state;
this.setItemsToSlide();
if (this.itemRef &&
this.itemRef.current &&
this.itemRef.current.offsetWidth !== itemWidth) {
this.itemRef.current.offsetWidth !== this.state.itemWidth) {
this.setState({ itemWidth: this.itemRef.current.offsetWidth });
}
this.setItemsToSlide();
}
resetAllItems() {
this.setState({ transform: 'translate3d(0px,0,0)', currentSlide: 0 });
this.setState({ transform: "translate3d(0px,0,0)", currentSlide: 0 });
}

@@ -130,3 +129,7 @@ componentDidUpdate(prevProps, { domLoaded, itemWidth }) {

if (this.itemRef.current.offsetWidth !== itemWidth) {
this.setState({ itemWidth: this.itemRef.current.offsetWidth });
this.setState({
itemWidth: this.itemRef.current.offsetWidth,
transform: `translate3d(${-(this.itemRef.current.offsetWidth * this.state.currentSlide)}px,0,0)`
});
this.setItemsToSlide();
}

@@ -200,3 +203,3 @@ }

!(removeArrowOnDeviceType &&
(deviceType && removeArrowOnDeviceType.indexOf(deviceType) > -1 ||
((deviceType && removeArrowOnDeviceType.indexOf(deviceType) > -1) ||
(this.state.deviceType &&

@@ -203,0 +206,0 @@ removeArrowOnDeviceType.indexOf(this.state.deviceType) > -1)));

{
"name": "react-multi-carousel",
"version": "1.0.14",
"version": "1.0.15",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

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