Skip to content

Commit

Permalink
feat(Files): Add more filetype icons
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-ketch committed May 20, 2021
1 parent 7b53515 commit 3265995
Showing 1 changed file with 8 additions and 2 deletions.
Expand Up @@ -9,7 +9,7 @@ export const getFileIcon = (file?: File): IconNames => {

// Handle folders
if (file.children) {
return 'folder'
return 'folder-open'
}

// Don't differentiate between image formats for now
Expand All @@ -18,6 +18,10 @@ export const getFileIcon = (file?: File): IconNames => {
}

switch (file.format) {
case 'csv':
return 'layout-grid'
case 'json':
return 'braces'
case 'zip':
return 'file-zip'
case 'r':
Expand All @@ -29,9 +33,11 @@ export const getFileIcon = (file?: File): IconNames => {
case 'word':
return 'file-word'
case 'pdf':
return 'article'
return 'newspaper'
case 'txt':
return 'file-text'
case 'md':
return 'markdown'
default:
return 'file-2'
}
Expand Down

0 comments on commit 3265995

Please sign in to comment.