feat: Introduce configurable icon and card sizes for document views and desktop workspace.
This commit is contained in:
@@ -24,7 +24,11 @@ import DocumentsPanelHeader, {
|
||||
import { SelectionFloatingPanel } from '../SelectionFloatingActions';
|
||||
import { createDocumentsTableHeaderActions } from './DocumentsToolbar';
|
||||
import { useDocumentsFilter } from '../context/DocumentsFilterContext';
|
||||
import { DEFAULT_GRID_ICON_SIZE } from '../../constants/documents';
|
||||
import {
|
||||
DEFAULT_GRID_ICON_SIZE,
|
||||
DEFAULT_LIST_ICON_SIZE,
|
||||
DEFAULT_DESKTOP_CARD_SIZE,
|
||||
} from '../../constants/documents';
|
||||
import type { Identifier } from '../../types/identifiers';
|
||||
|
||||
const EntryType = {
|
||||
@@ -490,12 +494,12 @@ const DocumentsPanelInner: React.FC<DocumentsPanelInnerProps> = ({
|
||||
|
||||
switch (viewMode) {
|
||||
case 'desk':
|
||||
return <DesktopWorkspace {...viewProps} />;
|
||||
return <DesktopWorkspace {...viewProps} defaultCardSize={DEFAULT_DESKTOP_CARD_SIZE} />;
|
||||
case 'grid':
|
||||
return <DocumentsGrid {...viewProps} gridIconSize={gridIconSize} />;
|
||||
return <DocumentsGrid {...viewProps} iconSize={gridIconSize} />;
|
||||
case 'list':
|
||||
default:
|
||||
return <DocumentsList {...viewProps} />;
|
||||
return <DocumentsList {...viewProps} iconSize={DEFAULT_LIST_ICON_SIZE} />;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user