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

DelimitedTablePreview.tsx

16 lines468 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 truncated: boolean;
9 readonly delimiter: "," | "\t";
10}) {
11 return (
12 <Suspense fallback={<FileSurfaceLoading />}>
13 <LargeTextViewer key={props.name} {...props} />
14 </Suspense>
15 );