|
1 | 1 | # react-medium-image-zoom
|
2 | 2 |
|
3 |
| -[](https://www.npmjs.com/package/react-medium-image-zoom) [](https://bundlejs.com/?q=react-medium-image-zoom) [](https://www.npmjs.com/package/react-medium-image-zoom) [](#contributors-) |
| 3 | +[](https://www.npmjs.com/package/react-medium-image-zoom) [](https://bundlejs.com/?q=react-medium-image-zoom) [](https://www.npmjs.com/package/react-medium-image-zoom) [](#contributors-) |
4 | 4 |
|
5 | 5 | The original [medium.com-inspired image zooming](https://medium.design/image-zoom-on-medium-24d146fc0c20)
|
6 | 6 | library for [React](https://reactjs.org).
|
@@ -286,13 +286,23 @@ export const MyImg = () => (
|
286 | 286 | )
|
287 | 287 |
|
288 | 288 | 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, |
296 | 306 | }) => {
|
297 | 307 | const [isLoaded, setIsLoaded] = useState(false)
|
298 | 308 |
|
@@ -467,6 +477,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
467 | 477 | <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>
|
468 | 478 | <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>
|
469 | 479 | <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> |
470 | 481 | </tr>
|
471 | 482 | </tbody>
|
472 | 483 | </table>
|
|
0 commit comments