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

DelimitedTablePreview.tsx

15 lines437 Bytes

1import { lazy, Suspense } from "react";
2import { FileSurfaceLoading } from "./fileSurfaceChrome";
3​
4const LargeTextViewer = lazy(() => import("./LargeTextViewer"));
5export function DelimitedTablePreview(props: {
6 readonly name: string;
7 readonly text: string;
8 readonly delimiter: "," | "\t";
9}) {
10 return (
11 <Suspense fallback={<FileSurfaceLoading />}>
12 <LargeTextViewer key={props.name} {...props} />
13 </Suspense>
14 );