aboutsummaryrefslogtreecommitdiff
path: root/components/Markdown/index.tsx
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2021-07-19 21:08:50 -0500
committerFurkan Sahin <furkan-dev@proton.me>2021-07-19 21:08:50 -0500
commit8532f6db348b833f642889effaf55f4733b6f84d (patch)
tree906343506983e48b5e24934ce416d0450f489c73 /components/Markdown/index.tsx
Init
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