aboutsummaryrefslogtreecommitdiff
path: root/components/Markdown/index.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'components/Markdown/index.tsx')
-rw-r--r--components/Markdown/index.tsx27
1 files changed, 27 insertions, 0 deletions
diff --git a/components/Markdown/index.tsx b/components/Markdown/index.tsx
new file mode 100644
index 0000000..4bb6c79
--- /dev/null
+++ b/components/Markdown/index.tsx
@@ -0,0 +1,27 @@
+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; \ No newline at end of file