unify detailpanel and documentviewer
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import DetailPanel from '../../detail/DetailPanel';
|
||||
import DocumentViewerPanel from '../../preview/DocumentViewerPanel';
|
||||
import SelectionFloatingActions from '../SelectionFloatingActions';
|
||||
import createWorkspaceSurfaceConfig from '../workspaceHeader';
|
||||
import DocumentsPanel from './DocumentsPanel';
|
||||
@@ -91,7 +91,14 @@ const createDocumentsSurface = ({
|
||||
: null;
|
||||
|
||||
const sidebarToggle = renderSidebarToggle ? renderSidebarToggle() : null;
|
||||
const detail = detailOpen && detailProps ? <DetailPanel {...detailProps} /> : null;
|
||||
const detail = detailOpen && detailProps
|
||||
? (
|
||||
<DocumentViewerPanel
|
||||
variant="sidebar"
|
||||
{...detailProps}
|
||||
/>
|
||||
)
|
||||
: null;
|
||||
|
||||
return createWorkspaceSurfaceConfig({
|
||||
key: 'documents',
|
||||
|
||||
Reference in New Issue
Block a user