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

react-image-gallery

Package Overview
Dependencies
Maintainers
1
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-image-gallery - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

20

build/image-gallery.js

@@ -404,6 +404,15 @@ 'use strict';

_createClass(ImageGallery, [{
key: 'componentDidMount',
value: function componentDidMount() {
if (this.props.autoPlay) {
this.play();
}
window.addEventListener('keydown', this._handleKeyDown);
this._onScreenChangeEvent();
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate(prevProps, prevState) {
var itemsSizeChanged = prevProps.items.length !== this.props.items.length;
var itemsChanged = prevProps.items !== this.props.items;
var itemsChanged = JSON.stringify(prevProps.items) !== JSON.stringify(this.props.items);
var startIndexUpdated = prevProps.startIndex !== this.props.startIndex;

@@ -429,11 +438,2 @@ if (itemsSizeChanged) {

}, {
key: 'componentDidMount',
value: function componentDidMount() {
if (this.props.autoPlay) {
this.play();
}
window.addEventListener('keydown', this._handleKeyDown);
this._onScreenChangeEvent();
}
}, {
key: 'componentWillUnmount',

@@ -440,0 +440,0 @@ value: function componentWillUnmount() {

{
"name": "react-image-gallery",
"version": "0.9.0",
"version": "0.9.1",
"description": "React carousel image gallery component with thumbnail and mobile support",

@@ -5,0 +5,0 @@ "main": "./build/image-gallery.js",

@@ -25,3 +25,3 @@ React Carousel Image Gallery

> `react-image-gallery` requires React 16.0.0 and above.
React Image Gallery requires **React 16.0.0 or later.**

@@ -31,14 +31,11 @@ ```

```
### Style import
### Style import (with webpack)
```
# SCSS
@import "node_modules/react-image-gallery/styles/scss/image-gallery.scss";
@import "~react-image-gallery/styles/scss/image-gallery.scss";
# CSS
@import "node_modules/react-image-gallery/styles/css/image-gallery.css";
@import "~react-image-gallery/styles/css/image-gallery.css";
# Webpack
import "react-image-gallery/styles/css/image-gallery.css";
# Stylesheet with no icons

@@ -49,5 +46,2 @@ node_modules/react-image-gallery/styles/scss/image-gallery-no-icon.scss

> When using webpack with css-loader, use `@import "~react-image-gallery/styles/scss/image-gallery.scss"` notation. [Read more abou it](https://github.com/webpack-contrib/css-loader#url)
### Example

@@ -64,14 +58,14 @@ Need more example? See [`example/app.js`](https://github.com/xiaolin/react-image-gallery/blob/master/example/app.js)

{
original: 'http://lorempixel.com/1000/600/nature/1/',
thumbnail: 'http://lorempixel.com/250/150/nature/1/',
original: 'https://picsum.photos/id/1018/1000/600/',
thumbnail: 'https://picsum.photos/id/1018/250/150/',
},
{
original: 'http://lorempixel.com/1000/600/nature/2/',
thumbnail: 'http://lorempixel.com/250/150/nature/2/'
original: 'https://picsum.photos/id/1015/1000/600/',
thumbnail: 'https://picsum.photos/id/1015/250/150/',
},
{
original: 'http://lorempixel.com/1000/600/nature/3/',
thumbnail: 'http://lorempixel.com/250/150/nature/3/'
}
]
original: 'https://picsum.photos/id/1019/1000/600/',
thumbnail: 'https://picsum.photos/id/1019/250/150/',
},
];

@@ -78,0 +72,0 @@ return (

@@ -166,5 +166,13 @@ import React from 'react';

componentDidMount() {
if (this.props.autoPlay) {
this.play();
}
window.addEventListener('keydown', this._handleKeyDown);
this._onScreenChangeEvent();
}
componentDidUpdate(prevProps, prevState) {
const itemsSizeChanged = prevProps.items.length !== this.props.items.length;
const itemsChanged = prevProps.items !== this.props.items;
const itemsChanged = JSON.stringify(prevProps.items) !== JSON.stringify(this.props.items);
const startIndexUpdated = prevProps.startIndex !== this.props.startIndex;

@@ -192,10 +200,2 @@ if (itemsSizeChanged) {

componentDidMount() {
if (this.props.autoPlay) {
this.play();
}
window.addEventListener('keydown', this._handleKeyDown);
this._onScreenChangeEvent();
}
componentWillUnmount() {

@@ -202,0 +202,0 @@ window.removeEventListener('keydown', this._handleKeyDown);

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