Skip to content

Commit 3b3b81a

Browse files
authored
Merge pull request #908 from rpearce/chore/cut-release
chore: cut release
2 parents 5f79b66 + 017e460 commit 3b3b81a

File tree

5 files changed

+37
-10
lines changed

5 files changed

+37
-10
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,15 @@
882882
"contributions": [
883883
"bug"
884884
]
885+
},
886+
{
887+
"login": "napstar-420",
888+
"name": "Zohaib Khan",
889+
"avatar_url": "https://avatars.githubusercontent.com/u/100934169?v=4",
890+
"profile": "https://github.com/napstar-420",
891+
"contributions": [
892+
"code"
893+
]
885894
}
886895
],
887896
"repoType": "github",

.changeset/smooth-pillows-rhyme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"react-medium-image-zoom": minor
3+
---
4+
5+
Added `isDisabled` prop; provided `isZoomImgLoaded` for `ZoomContent`

README.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# react-medium-image-zoom
22

3-
[![npm version](https://img.shields.io/npm/v/react-medium-image-zoom.svg)](https://www.npmjs.com/package/react-medium-image-zoom) [![react-medium-image-zoom bundlejs badge](https://deno.bundlejs.com/?q=react-medium-image-zoom&badge=&config={%22esbuild%22:{%22external%22:[%22react%22,%22react-dom%22]}})](https://bundlejs.com/?q=react-medium-image-zoom) [![npm downloads](https://img.shields.io/npm/dm/react-medium-image-zoom.svg)](https://www.npmjs.com/package/react-medium-image-zoom) [![All Contributors](https://img.shields.io/badge/all_contributors-89-orange.svg)](#contributors-)
3+
[![npm version](https://img.shields.io/npm/v/react-medium-image-zoom.svg)](https://www.npmjs.com/package/react-medium-image-zoom) [![react-medium-image-zoom bundlejs badge](https://deno.bundlejs.com/?q=react-medium-image-zoom&badge=&config={%22esbuild%22:{%22external%22:[%22react%22,%22react-dom%22]}})](https://bundlejs.com/?q=react-medium-image-zoom) [![npm downloads](https://img.shields.io/npm/dm/react-medium-image-zoom.svg)](https://www.npmjs.com/package/react-medium-image-zoom) [![All Contributors](https://img.shields.io/badge/all_contributors-90-orange.svg)](#contributors-)
44

55
The original [medium.com-inspired image zooming](https://medium.design/image-zoom-on-medium-24d146fc0c20)
66
library for [React](https://reactjs.org).
@@ -286,13 +286,23 @@ export const MyImg = () => (
286286
)
287287

288288
const CustomZoomContent = ({
289-
buttonUnzoom, // default unzoom button
290-
modalState, // current state of the zoom modal: UNLOADED, LOADING, LOADED, UNLOADING
291-
img, // your image, prepped for zooming
292-
isZoomImgLoaded, // state to check if zoom img is loaded (useful to show loading)
293-
//onUnzoom, // unused here, but a callback to manually unzoom the image and
294-
// close the modal if you want to use your own buttons or
295-
// listeners in your custom experience
289+
/** Default unzoom button */
290+
buttonUnzoom,
291+
292+
/** Current state of the zoom modal: UNLOADED, LOADING, LOADED, UNLOADING */
293+
modalState,
294+
295+
/** Your image, prepped for zooming */
296+
img,
297+
298+
/** A state to check if the zoom img is loaded (useful for loading state) */
299+
// isZoomImgLoaded,
300+
301+
/**
302+
* A callback to manually unzoom the image and close the modal if you want to
303+
* use your own buttons or listeners in your custom experience.
304+
*/
305+
//onUnzoom,
296306
}) => {
297307
const [isLoaded, setIsLoaded] = useState(false)
298308

@@ -467,6 +477,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
467477
<td align="center" valign="top" width="14.28%"><a href="https://github.com/imalfect"><img src="https://avatars.githubusercontent.com/u/77974917?v=4?s=40" width="40px;" alt="iMalFect"/><br /><sub><b>iMalFect</b></sub></a><br /><a href="https://github.com/rpearce/react-medium-image-zoom/issues?q=author%3Aimalfect" title="Bug reports">🐛</a></td>
468478
<td align="center" valign="top" width="14.28%"><a href="https://upleveled.io/"><img src="https://avatars.githubusercontent.com/u/1935696?v=4?s=40" width="40px;" alt="Karl Horky"/><br /><sub><b>Karl Horky</b></sub></a><br /><a href="https://github.com/rpearce/react-medium-image-zoom/issues?q=author%3Akarlhorky" title="Bug reports">🐛</a> <a href="#ideas-karlhorky" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/rpearce/react-medium-image-zoom/pulls?q=is%3Apr+reviewed-by%3Akarlhorky" title="Reviewed Pull Requests">👀</a></td>
469479
<td align="center" valign="top" width="14.28%"><a href="https://wener.me/"><img src="https://avatars.githubusercontent.com/u/1777211?v=4?s=40" width="40px;" alt="陈杨文"/><br /><sub><b>陈杨文</b></sub></a><br /><a href="https://github.com/rpearce/react-medium-image-zoom/issues?q=author%3Awenerme" title="Bug reports">🐛</a></td>
480+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/napstar-420"><img src="https://avatars.githubusercontent.com/u/100934169?v=4?s=40" width="40px;" alt="Zohaib Khan"/><br /><sub><b>Zohaib Khan</b></sub></a><br /><a href="https://github.com/rpearce/react-medium-image-zoom/commits?author=napstar-420" title="Code">💻</a></td>
470481
</tr>
471482
</tbody>
472483
</table>

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
"Yida Zhang <[email protected]>",
3636
"eych",
3737
"tshmieldev",
38-
"David Edler (https://github.com/edlerd)"
38+
"David Edler (https://github.com/edlerd)",
39+
"Zohaib Khan <[email protected]> (https://zohaib.is-a.dev)"
3940
],
4041
"funding": [
4142
{

stories/Img.stories.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,8 @@ const CustomZoomContent: UncontrolledProps['ZoomContent'] = ({
320320
buttonUnzoom,
321321
modalState,
322322
img,
323-
//onUnzooom, // Not used here, but could be
323+
// isZoomImgLoaded, // Not used in this example
324+
// onUnzooom, // Not used in this example
324325
}) => {
325326
const [isLoaded, setIsLoaded] = React.useState(false)
326327

0 commit comments

Comments
 (0)