mirror of
https://github.com/coder/coder.git
synced 2026-10-29 17:44:33 +08:00
12 lines
332 B
TypeScript
12 lines
332 B
TypeScript
import { lazy, Suspense, type ComponentProps } from "react";
|
|
|
|
const IconField = lazy(() => import("./IconField"));
|
|
|
|
export const LazyIconField = (props: ComponentProps<typeof IconField>) => {
|
|
return (
|
|
<Suspense fallback={<div role="progressbar" data-testid="loader" />}>
|
|
<IconField {...props} />
|
|
</Suspense>
|
|
);
|
|
};
|