yet-another-react-lightbox 1.9.4 → 1.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -20,6 +20,8 @@ Modern React lightbox component. Performant, easy to use, customizable and exten
20
20
  - **TypeScript:** type definitions come built-in in the package
21
21
  - **RTL:** compatible with RTL layout
22
22
 
23
+ ![Yet Another React Lightbox | Example](https://yet-another-react-lightbox.com/images/example.jpg)
24
+
23
25
  ## Documentation
24
26
 
25
27
  [https://yet-another-react-lightbox.com/documentation](https://yet-another-react-lightbox.com/documentation)
@@ -48,25 +50,25 @@ import Lightbox from "yet-another-react-lightbox";
48
50
  import "yet-another-react-lightbox/styles.css";
49
51
 
50
52
  const App = () => {
51
- const [open, setOpen] = React.useState(false);
52
-
53
- return (
54
- <>
55
- <button type="button" onClick={() => setOpen(true)}>
56
- Open Lightbox
57
- </button>
58
-
59
- <Lightbox
60
- open={open}
61
- close={() => setOpen(false)}
62
- slides={[
63
- { src: "/image1.jpg" },
64
- { src: "/image2.jpg" },
65
- { src: "/image3.jpg" },
66
- ]}
67
- />
68
- </>
69
- );
53
+ const [open, setOpen] = React.useState(false);
54
+
55
+ return (
56
+ <>
57
+ <button type="button" onClick={() => setOpen(true)}>
58
+ Open Lightbox
59
+ </button>
60
+
61
+ <Lightbox
62
+ open={open}
63
+ close={() => setOpen(false)}
64
+ slides={[
65
+ { src: "/image1.jpg" },
66
+ { src: "/image2.jpg" },
67
+ { src: "/image3.jpg" },
68
+ ]}
69
+ />
70
+ </>
71
+ );
70
72
  };
71
73
 
72
74
  export default App;
@@ -85,36 +87,36 @@ import Lightbox from "yet-another-react-lightbox";
85
87
  import "yet-another-react-lightbox/styles.css";
86
88
 
87
89
  const App = () => {
88
- const [open, setOpen] = React.useState(false);
89
-
90
- return (
91
- <>
92
- <button type="button" onClick={() => setOpen(true)}>
93
- Open Lightbox
94
- </button>
95
-
96
- <Lightbox
97
- open={open}
98
- close={() => setOpen(false)}
99
- slides={[
100
- {
101
- src: "/image1x3840.jpg",
102
- alt: "image 1",
103
- width: 3840,
104
- height: 2560,
105
- srcSet: [
106
- { src: "/image1x320.jpg", width: 320, height: 213 },
107
- { src: "/image1x640.jpg", width: 640, height: 427 },
108
- { src: "/image1x1200.jpg", width: 1200, height: 800 },
109
- { src: "/image1x2048.jpg", width: 2048, height: 1365 },
110
- { src: "/image1x3840.jpg", width: 3840, height: 2560 },
111
- ]
112
- },
113
- // ...
114
- ]}
115
- />
116
- </>
117
- );
90
+ const [open, setOpen] = React.useState(false);
91
+
92
+ return (
93
+ <>
94
+ <button type="button" onClick={() => setOpen(true)}>
95
+ Open Lightbox
96
+ </button>
97
+
98
+ <Lightbox
99
+ open={open}
100
+ close={() => setOpen(false)}
101
+ slides={[
102
+ {
103
+ src: "/image1x3840.jpg",
104
+ alt: "image 1",
105
+ width: 3840,
106
+ height: 2560,
107
+ srcSet: [
108
+ { src: "/image1x320.jpg", width: 320, height: 213 },
109
+ { src: "/image1x640.jpg", width: 640, height: 427 },
110
+ { src: "/image1x1200.jpg", width: 1200, height: 800 },
111
+ { src: "/image1x2048.jpg", width: 2048, height: 1365 },
112
+ { src: "/image1x3840.jpg", width: 3840, height: 2560 },
113
+ ]
114
+ },
115
+ // ...
116
+ ]}
117
+ />
118
+ </>
119
+ );
118
120
  };
119
121
 
120
122
  export default App;
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { Component, Plugin } from "../types.js";
3
3
  declare module "../types.js" {
4
4
  interface LightboxProps {
5
- /** HTML div element attributes to be passed to the inline plugin container */
5
+ /** HTML div element attributes to be passed to the Inline plugin container */
6
6
  inline?: React.HTMLAttributes<HTMLDivElement>;
7
7
  }
8
8
  }
@@ -14,6 +14,8 @@
14
14
  top: 0;
15
15
  padding: 16px;
16
16
  background: rgba(0, 0, 0, 0.5);
17
+ -webkit-transform: translateZ(0);
18
+ transform: translateZ(0);
17
19
  }
18
20
  .yarl__slide_description {
19
21
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
@@ -35,4 +37,6 @@
35
37
  bottom: 0;
36
38
  padding: 16px;
37
39
  background: rgba(0, 0, 0, 0.5);
40
+ -webkit-transform: translateZ(0);
41
+ transform: translateZ(0);
38
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yet-another-react-lightbox",
3
- "version": "1.9.4",
3
+ "version": "1.9.5",
4
4
  "description": "Modern React lightbox component",
5
5
  "author": "Igor Danchenko",
6
6
  "license": "MIT",