@lobehub/ui
Version:
Lobe UI is an open-source UI component library for building AIGC web apps
45 lines (44 loc) • 1.67 kB
TypeScript
import type { AnchorProps } from 'antd';
import { CSSProperties, FC, ReactNode } from 'react';
import { Components } from 'react-markdown/lib';
import type { Pluggable } from 'unified';
import { type HighlighterProps } from "../Highlighter";
import { type MermaidProps } from "../Mermaid";
import { type ImageProps } from "../mdx/mdxComponents/Image";
import { type PreProps } from "../mdx/mdxComponents/Pre";
import { type VideoProps } from "../mdx/mdxComponents/Video";
import type { AProps } from "../types";
import { CitationItem } from "../types/citation";
import type { TypographyProps } from './Typography';
export interface MarkdownProps extends TypographyProps {
allowHtml?: boolean;
children: string;
citations?: CitationItem[];
className?: string;
componentProps?: {
a?: Partial<AProps & AnchorProps>;
highlight?: Partial<HighlighterProps>;
img?: Partial<ImageProps>;
mermaid?: Partial<MermaidProps>;
pre?: Partial<PreProps>;
video?: Partial<VideoProps>;
};
components?: Components & Record<string, FC>;
customRender?: (dom: ReactNode, context: {
text: string;
}) => ReactNode;
enableCustomFootnotes?: boolean;
enableImageGallery?: boolean;
enableLatex?: boolean;
enableMermaid?: boolean;
fullFeaturedCodeBlock?: boolean;
onDoubleClick?: () => void;
rehypePlugins?: Pluggable[];
remarkPlugins?: Pluggable[];
remarkPluginsAhead?: Pluggable[];
showFootnotes?: boolean;
style?: CSSProperties;
variant?: 'normal' | 'chat';
}
declare const Markdown: import("react").NamedExoticComponent<MarkdownProps>;
export default Markdown;