import React, { useContext } from 'react' import { SharedDataContext } from '../markdown'; type Props = { [key: string]: any } export default function Img(props: Props) { const { src, alt, title, className, position } = props const { imageOnClick } = useContext(SharedDataContext); return ( // @ts-ignore { imageOnClick?.(src) }} alt={alt} title={title} className={className} position={position} /> ) }