import ReactMarkdown from "react-markdown";

const MarkDown = ({ markdown }: any) => {
  return (
    <div className="m-10">
      <ReactMarkdown
        children={markdown}
        components={{
          img: ({ node, ...props }) => (
            <img
              {...props}
              loading="lazy"
              className="w-100  max-w-md mx-auto my-4 rounded-lg "
              alt={props.alt || ""}
            />
          ),
        }}
      />
    </div>
  );
};

export default MarkDown;
