diff --git a/packages/react-storage/src/components/StorageBrowser/createStorageBrowser.tsx b/packages/react-storage/src/components/StorageBrowser/createStorageBrowser.tsx index d5a84badab..01b0b26782 100644 --- a/packages/react-storage/src/components/StorageBrowser/createStorageBrowser.tsx +++ b/packages/react-storage/src/components/StorageBrowser/createStorageBrowser.tsx @@ -36,7 +36,6 @@ import { CreateStorageBrowserOutput, StorageBrowserProviderProps, StorageBrowserType, - DerivedCustomViews, DerivedActionViewType, } from './types'; import { @@ -125,10 +124,10 @@ export function createStorageBrowser< ); } - const StorageBrowser: StorageBrowserType< - DerivedActionViewType, - DerivedCustomViews - > = ({ views, displayText }) => ( + const StorageBrowser: StorageBrowserType = ({ + views, + displayText, + }) => ( diff --git a/packages/react-storage/src/components/StorageBrowser/types.ts b/packages/react-storage/src/components/StorageBrowser/types.ts index 2757ef6154..261257d8e7 100644 --- a/packages/react-storage/src/components/StorageBrowser/types.ts +++ b/packages/react-storage/src/components/StorageBrowser/types.ts @@ -61,15 +61,19 @@ export interface StorageBrowserProviderProps views?: V; } -export interface StorageBrowserType { - (props: StorageBrowserProps): React.JSX.Element; +export interface StorageBrowserType { + ( + props: StorageBrowserProps, DerivedCustomViews> + ): React.JSX.Element; displayName: string; - Provider: (props: StorageBrowserProviderProps) => React.JSX.Element; + Provider: ( + props: StorageBrowserProviderProps> + ) => React.JSX.Element; CopyView: CopyViewType; CreateFolderView: CreateFolderViewType; DeleteView: DeleteViewType; UploadView: UploadViewType; - LocationActionView: LocationActionViewType; + LocationActionView: LocationActionViewType>; LocationDetailView: LocationDetailViewType; LocationsView: LocationsViewType; } @@ -97,10 +101,7 @@ export type DerivedActionViewType = export interface CreateStorageBrowserOutput< C extends ExtendedActionConfigs = ExtendedActionConfigs, > { - StorageBrowser: StorageBrowserType< - DerivedActionViewType, - DerivedCustomViews - >; + StorageBrowser: StorageBrowserType; useAction: UseAction>; useView: UseView; }