import React, { FC } from 'react';
import styles from './markdown.module.scss';
import clsx from 'clsx';

interface MarkdownProps {
    md: string;
    className?: string;
    props?: object;
}

const Markdown : FC<MarkdownProps> = ({md, className, ...props}) => (
    <div
        className={clsx(styles.markdownContainer, className)}

        dangerouslySetInnerHTML={{
            __html: md
        }}

        {...props}
    />
);

export type {
    MarkdownProps
};

export default Markdown;
