revite/src/components/markdown/Markdown.tsx

18 lines
397 B
TypeScript
Raw Normal View History

2021-06-19 13:46:05 -04:00
import { Suspense, lazy } from "preact/compat";
const Renderer = lazy(() => import('./Renderer'));
export interface MarkdownProps {
content?: string;
disallowBigEmoji?: boolean;
}
export default function Markdown(props: MarkdownProps) {
return (
// @ts-expect-error
<Suspense fallback={props.content}>
2021-06-19 13:46:05 -04:00
<Renderer {...props} />
</Suspense>
)
}