Skip to content

Commit c9fc92e

Browse files
committed
updated documentation
1 parent a50295b commit c9fc92e

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Want to come along on this journey and/or have some great ideas on how to improv
2727

2828
## How it works?
2929

30-
This component has a very minimal styling footprint only setting the minimum to make it work, in addition you can pass in your own `className` and `id` props enabling you to adapt the design to your needs.
30+
This component has a very minimal styling footprint only setting the minimum to make it work, in addition you can pass in your own classes via the `theme` and `id` props enabling you to adapt the design to your needs.
3131

3232
For extra customization of the style of this component it will also add some extra classes dynamically depending on its state.
3333

@@ -81,7 +81,8 @@ This component accepts the following attributes:
8181

8282
| Prop | Default value | required |
8383
| --------- | :--------------------------: | -------: |
84-
| className | Null | false |
84+
| className (deprecated) | Null | false |
85+
| theme | undefined | false |
8586
| id | Null | false |
8687
| src | Null | true |
8788
| zoom | 200 | false |
@@ -99,10 +100,10 @@ import ImageZoom from "react-image-zooom";
99100
function myZoomableImg() {
100101
return (
101102
<ul className="myGallery">
102-
<li><ImageZoom className="myGalleryImg" src="https://picsum.photos/seed/001/1920/1080" alt="My gallery image 1" zoom="300"/></li>
103-
<li><ImageZoom className="myGalleryImg" src="https://picsum.photos/seed/002/1920/1080" alt="My gallery image 2" zoom="200"/></li>
104-
<li><ImageZoom className="myGalleryImg" src="https://picsum.photos/seed/003/1920/1080" alt="My gallery image 3" zoom="200"/></li>
105-
<li><ImageZoom className="myGalleryImg" src="https://picsum.photos/seed/004/1920/1080" alt="My gallery image 4" zoom="300"/></li>
103+
<li><ImageZoom theme="{{root: "galleryItem", image: "myGalleryImg"}}" src="https://picsum.photos/seed/001/1920/1080" alt="My gallery image 1" zoom="300"/></li>
104+
<li><ImageZoom theme="{{root: "galleryItem", image: "myGalleryImg"}}" src="https://picsum.photos/seed/002/1920/1080" alt="My gallery image 2" zoom="200"/></li>
105+
<li><ImageZoom theme="{{root: "galleryItem", image: "myGalleryImg"}}" src="https://picsum.photos/seed/003/1920/1080" alt="My gallery image 3" zoom="200"/></li>
106+
<li><ImageZoom theme="{{root: "galleryItem", image: "myGalleryImg"}}" src="https://picsum.photos/seed/004/1920/1080" alt="My gallery image 4" zoom="300"/></li>
106107
</ul>
107108
);
108109
}

0 commit comments

Comments
 (0)