Skip to content
Source
Sign inSign up
Open History to see the last commit

MermaidFilePreview.tsx

13 lines368 Bytes

1import { lazy, Suspense } from "react";
2​
3import { FileSurfaceLoading } from "./fileSurfaceChrome";
4​
5const MermaidViewer = lazy(() => import("./MermaidViewer"));
6​
7export function MermaidFilePreview(props: { readonly text: string }) {
8 return (
9 <Suspense fallback={<FileSurfaceLoading />}>
10 <MermaidViewer key={props.text} {...props} />
11 </Suspense>
12 );