import { PropsWithChildren } from 'react' import ReactMarkdown, { type Options } from 'react-markdown' import remarkGfm from 'remark-gfm' import { cn } from 'ui' import { InlineLink } from '@/components/ui/InlineLink' interface MarkdownProps extends Omit { className?: string /** @deprecated Should remove this and just take `children` instead */ content?: string extLinks?: boolean } const H3 = ({ children, }: React.DetailedHTMLProps, HTMLHeadingElement>) => (

{children}

) const Code = ({ children, }: React.DetailedHTMLProps, HTMLElement>) => ( {children} ) const A = ({ href, children, }: React.DetailedHTMLProps, HTMLAnchorElement>) => ( {children} ) export const Markdown = ({ children, className, content = '', extLinks = false, ...props }: PropsWithChildren) => { return (
{(children as string) ?? content}
) }