mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-10 04:22:27 +10:00
21 lines
445 B
TypeScript
21 lines
445 B
TypeScript
import clsx from 'clsx';
|
|
import { isEmpty } from 'lodash';
|
|
import ReactMarkdown from 'react-markdown';
|
|
|
|
type Props = {
|
|
children?: string;
|
|
className?: string;
|
|
};
|
|
|
|
const Markdown: React.FC<Props> = ({ className, children }) => {
|
|
if (!children || isEmpty(children)) return null;
|
|
|
|
return (
|
|
<ReactMarkdown remarkPlugins={[]} className={clsx('markdown', className)}>
|
|
{children}
|
|
</ReactMarkdown>
|
|
);
|
|
};
|
|
|
|
export default Markdown;
|