Barazo default frontend
barazo.forum
1/**
2 * MarkdownPreview - Live preview of markdown content.
3 * Uses the shared MarkdownContent component for rendering.
4 * @see specs/prd-web.md Section 4 (Editor Components)
5 */
6
7import { cn } from '@/lib/utils'
8import { MarkdownContent } from './markdown-content'
9
10interface MarkdownPreviewProps {
11 content: string
12 className?: string
13}
14
15export function MarkdownPreview({ content, className }: MarkdownPreviewProps) {
16 return (
17 <div className={cn('space-y-1', className)}>
18 <p className="block text-sm font-medium text-foreground">Preview</p>
19 <div className="min-h-[200px] rounded-md border border-border bg-card p-4">
20 {content ? (
21 <MarkdownContent content={content} />
22 ) : (
23 <p className="text-sm text-muted-foreground">Nothing to preview</p>
24 )}
25 </div>
26 </div>
27 )
28}