-
-
Save brunosabot/4fc512dc3bdc5b3ac637f942c26c0466 to your computer and use it in GitHub Desktop.
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
const components = { | |
code: ({ className, children }: { className: string; children: any }) => { | |
if (className === undefined) return <code>{children}</code>; | |
return <Gist code={children} lang={className.replace("language-", "")} />; | |
}, | |
Gist: Gist, | |
img: (props: { src: string; alt: string }) => ( | |
// eslint-disable-next-line @next/next/no-img-element | |
<img {...props} src={props.src} alt={props.alt} loading="lazy" /> | |
), | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment