Created
April 6, 2021 16:35
-
-
Save prichodko/4cb5f5a698d64939003c6eda11672ff1 to your computer and use it in GitHub Desktop.
MDX with next/image and zoom
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Image from 'next/image'; | |
import Zoom from 'react-medium-image-zoom' | |
const MyImage = (props) => { | |
return ( | |
<Zoom> | |
<Image | |
src={props.src} | |
alt={props.alt} | |
width={props.width} | |
height={props.height} | |
/> | |
</Zoom> | |
) | |
} | |
const MDXComponents = { | |
img: MyImage, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment