Skip to content

Commit

Permalink
Add spreadsheet config collection element type (#650)
Browse files Browse the repository at this point in the history
Signed-off-by: Ayoub LABIDI <ayoub.labidi@protonmail.com>
  • Loading branch information
ayolab authored Dec 16, 2024
1 parent 5f0e612 commit 51b33fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils/mapper/getFileIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
Photo as PhotoIcon,
PhotoLibrary as PhotoLibraryIcon,
Settings as SettingsIcon,
TableView as TableViewIcon,
} from '@mui/icons-material';
import { SxProps, Theme } from '@mui/material';
import { ElementType } from '../types/elementType';
Expand All @@ -37,6 +38,8 @@ export function getFileIcon(type: ElementType, style: SxProps<Theme>) {
return <SettingsIcon sx={style} />;
case ElementType.SPREADSHEET_CONFIG:
return <CalculateIcon sx={style} />;
case ElementType.SPREADSHEET_CONFIG_COLLECTION:
return <TableViewIcon sx={style} />;
case ElementType.DIRECTORY:
// to easily use in TreeView we do not give icons for directories
return undefined;
Expand Down
1 change: 1 addition & 0 deletions src/utils/types/elementType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export enum ElementType {
SENSITIVITY_PARAMETERS = 'SENSITIVITY_PARAMETERS',
SHORT_CIRCUIT_PARAMETERS = 'SHORT_CIRCUIT_PARAMETERS',
SPREADSHEET_CONFIG = 'SPREADSHEET_CONFIG',
SPREADSHEET_CONFIG_COLLECTION = 'SPREADSHEET_CONFIG_COLLECTION',
}

export type ElementExistsType = (directory: UUID, value: string, elementType: ElementType) => Promise<boolean>;

0 comments on commit 51b33fe

Please sign in to comment.