Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add loopworkspace extension to FileIconType #28553

Merged
merged 2 commits into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Add loopworkspace to FileIconType enum\"",
"packageName": "@fluentui/react-file-type-icons",
"email": "ololubek@microsoft.com",
"dependentChangeType": "patch"
}
3 changes: 2 additions & 1 deletion packages/react-file-type-icons/src/FileIconType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export enum FileIconType {
form = 14,
sway = 15,
playlist = 16,
loopworkspace = 17,
}

export type FileIconTypeInput = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16;
export type FileIconTypeInput = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17;
4 changes: 4 additions & 0 deletions packages/react-file-type-icons/src/getFileTypeIconProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const LINKED_FOLDER = 'linkedfolder';
const FORM = 'form';
const SWAY = 'sway';
const PLAYLIST = 'playlist';
const LOOP_WORKSPACE = 'loopworkspace';

export const DEFAULT_ICON_SIZE: FileTypeIconSize = 16;
export type FileTypeIconSize = 16 | 20 | 24 | 32 | 40 | 48 | 64 | 96;
Expand Down Expand Up @@ -143,6 +144,9 @@ export function getFileTypeIconNameFromExtensionOrType(
case FileIconType.playlist:
iconBaseName = PLAYLIST;
break;
case FileIconType.loopworkspace:
iconBaseName = LOOP_WORKSPACE;
break;
}
}
return iconBaseName || GENERIC_FILE;
Expand Down