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

FontFilePreview.tsx

13 lines377 Bytes

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