- rename snippet identity from name to alias and add required title fields - migrate snippet API, forms, cards, and detail views to alias/title semantics - render markdown descriptions with short card previews and split vendor chunks
17 lines
478 B
TypeScript
17 lines
478 B
TypeScript
import ReactMarkdown from 'react-markdown';
|
|
import remarkGfm from 'remark-gfm';
|
|
import styles from './MarkdownContent.module.css';
|
|
|
|
export interface MarkdownContentProps {
|
|
content: string;
|
|
className?: string;
|
|
}
|
|
|
|
export function MarkdownContent({ content, className }: MarkdownContentProps) {
|
|
return (
|
|
<div className={`${styles.markdown}${className ? ` ${className}` : ''}`}>
|
|
<ReactMarkdown remarkPlugins={[remarkGfm]}>{content}</ReactMarkdown>
|
|
</div>
|
|
);
|
|
}
|