feat(ST-1114): add shared Markdown wrapper, apply to task-detail and story-dialog

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Janpeter Visser 2026-04-30 00:36:08 +02:00
parent 73c27ac43e
commit 353f21d69a
3 changed files with 25 additions and 11 deletions

21
components/markdown.tsx Normal file
View file

@ -0,0 +1,21 @@
import ReactMarkdown from 'react-markdown'
import remarkGfm from 'remark-gfm'
import { cn } from '@/lib/utils'
interface MarkdownProps {
children: string
className?: string
}
export function Markdown({ children, className }: MarkdownProps) {
return (
<div className={cn('prose prose-sm dark:prose-invert max-w-none', className)}>
<ReactMarkdown
remarkPlugins={[remarkGfm]}
disallowedElements={['script', 'iframe']}
>
{children}
</ReactMarkdown>
</div>
)
}