import React from 'react' import Markdoc from '@markdoc/markdoc' import { Heading } from './markdoc/Heading' import { List } from './markdoc/List' import { ListItem } from './markdoc/ListItem' import { Image } from './markdoc/Image' import { Table, TableHead, TableBody, TableRow, TableHeader, TableCell } from './markdoc/Table' // Paragraph component const Paragraph = ({ children }: { children: React.ReactNode }) => { return
{children}
} // Link component const Link = ({ href, title, children, }: { href: string title?: string children: React.ReactNode }) => { const isExternal = href?.startsWith('http') return ( {children} ) } // Inline code component const InlineCode = ({ content, children }: { content?: string; children?: React.ReactNode }) => { return (
{content || children}
)
}
// Code block component
const CodeBlock = ({
content,
language,
children,
}: {
content?: string
language?: string
children?: React.ReactNode
}) => {
const code = content || (typeof children === 'string' ? children : '')
return (
{code}