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

@jalik/react-lightbox

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jalik/react-lightbox - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

5

CHANGELOG.md
# Changelog
## v1.0.9
- Fixed closing of lightbox
- Upgraded dependencies
## v1.0.8

@@ -4,0 +9,0 @@

5

dist/components/LightBoxWrapper.js

@@ -37,3 +37,4 @@ "use strict";

var _useLightBoxContext = (0, _useLightBoxContext2["default"])(),
dispatch = _useLightBoxContext.dispatch;
dispatch = _useLightBoxContext.dispatch,
show = _useLightBoxContext.show;

@@ -47,3 +48,3 @@ var memoizedPaths = (0, _react.useMemo)(function () {

// Check if clicked element is an image declared in light box wrapper.
if (event.target.nodeName === 'IMG') {
if (!show && event.target.nodeName === 'IMG') {
var activeIndex = memoizedPaths.indexOf(decodeURIComponent(event.target.src));

@@ -50,0 +51,0 @@

4

package.json
{
"name": "@jalik/react-lightbox",
"version": "1.0.8",
"version": "1.0.9",
"description": "Light box component for React",

@@ -51,3 +51,3 @@ "main": "dist/index.js",

"jest": "^26.6.3",
"react": "^16.14.0",
"react": "^17.0.2",
"rimraf": "^3.0.2",

@@ -54,0 +54,0 @@ "typescript": "^4.2.4"

/*
* The MIT License (MIT)
* Copyright (c) 2020 Karl STEIN
* Copyright (c) 2021 Karl STEIN
*/

@@ -18,3 +18,3 @@

function LightBoxWrapper({ children, items }) {
const { dispatch } = useLightBoxContext();
const { dispatch, show } = useLightBoxContext();
const memoizedPaths = useMemo(() => (

@@ -26,3 +26,3 @@ items.map((item) => (decodeURIComponent(item.src)))

// Check if clicked element is an image declared in light box wrapper.
if (event.target.nodeName === 'IMG') {
if (!show && event.target.nodeName === 'IMG') {
const activeIndex = memoizedPaths.indexOf(decodeURIComponent(event.target.src));

@@ -29,0 +29,0 @@

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