diff options
author | flu0r1ne <flu0r1ne@flu0r1ne.net> | 2021-07-19 21:08:50 -0500 |
---|---|---|
committer | flu0r1ne <flu0r1ne@flu0r1ne.net> | 2021-07-19 21:08:50 -0500 |
commit | f1f25f4764dd8d297a59765b0df85f55da2b39ee (patch) | |
tree | 9c10f3fcde264a1b13dccc64b9037f46d9bbc121 /components/Markdown/index.tsx | |
download | homepage-f1f25f4764dd8d297a59765b0df85f55da2b39ee.tar.xz homepage-f1f25f4764dd8d297a59765b0df85f55da2b39ee.zip |
Init
Diffstat (limited to 'components/Markdown/index.tsx')
-rw-r--r-- | components/Markdown/index.tsx | 27 |
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 |