mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 07:22:17 +08:00

* Make lazy NestedFolderPicker * Change permission prop to use string union instead of enum * reword comment
17 lines
555 B
TypeScript
17 lines
555 B
TypeScript
import { Suspense, lazy } from 'react';
|
|
|
|
import { FolderPickerSkeleton } from './Skeleton';
|
|
|
|
const SuspendingNestedFolderPicker = lazy(() =>
|
|
import('./NestedFolderPicker').then((module) => ({ default: module.NestedFolderPicker }))
|
|
);
|
|
|
|
// Lazily load folder picker, is what is exposed to plugins through @grafana/runtime
|
|
export const LazyFolderPicker = (props: Parameters<typeof SuspendingNestedFolderPicker>[0]) => {
|
|
return (
|
|
<Suspense fallback={<FolderPickerSkeleton />}>
|
|
<SuspendingNestedFolderPicker {...props} />
|
|
</Suspense>
|
|
);
|
|
};
|