zimme-zoom 0.1.2 → 0.1.3

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.
Files changed (2) hide show
  1. package/README.md +57 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -10,7 +10,63 @@ yarn add zimme-zoom
10
10
 
11
11
  ## Usage
12
12
 
13
- 📖 **Storybook:** [https://zimme-zoom.vercel.app](https://zimme-zoom.vercel.app)
13
+ ### Basic Example
14
+
15
+ ```tsx
16
+ import { PhotoViewer } from 'zimme-zoom';
17
+ import type { ZZImage } from 'zimme-zoom';
18
+
19
+ const images: ZZImage[] = [
20
+ {
21
+ id: '1',
22
+ src: 'https://example.com/image1.jpg',
23
+ alt: 'Image 1',
24
+ title: 'My Photo',
25
+ },
26
+ ];
27
+
28
+ function App() {
29
+ const [selectedImage, setSelectedImage] = useState<ZZImage | null>(null);
30
+
31
+ return (
32
+ <>
33
+ <button onClick={() => setSelectedImage(images[0])}>View Photo</button>
34
+ <PhotoViewer images={images} selectedImage={selectedImage} onClose={() => setSelectedImage(null)} />
35
+ </>
36
+ );
37
+ }
38
+ ```
39
+
40
+ ### With SVG Overlay
41
+
42
+ ```tsx
43
+ const imageWithOverlay: ZZImage = {
44
+ id: '2',
45
+ src: 'https://example.com/image2.jpg',
46
+ alt: 'Image with overlay',
47
+ svgOverlay: <YourSVGComponent />,
48
+ overlayPosition: 'bottom-right',
49
+ overlaySize: { maxWidth: 200, maxHeight: 200 },
50
+ };
51
+ ```
52
+
53
+ ### Custom Settings
54
+
55
+ ```tsx
56
+ <PhotoViewer
57
+ images={images}
58
+ selectedImage={selectedImage}
59
+ onClose={() => setSelectedImage(null)}
60
+ settings={{
61
+ allowZoom: true,
62
+ allowRotate: true,
63
+ maxZoom: 5,
64
+ zoomStep: 0.3,
65
+ }}
66
+ />
67
+ ```
68
+
69
+ 📖 **More examples and interactive demos:** [Storybook](https://zimme-zoom.vercel.app)
14
70
 
15
71
  ## License
16
72
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zimme-zoom",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "A lightweight React photo viewer with zoom, navigation, blurred background, and SVG overlay support",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",