18 lines
420 B
JavaScript
18 lines
420 B
JavaScript
const iconTypes = {
|
|
doc: 'file-word-o',
|
|
docx: 'file-word-o',
|
|
odt: 'file-word-o',
|
|
ods: 'file-excel-o',
|
|
pdf: 'file-pdf-o',
|
|
png: 'file-image-o',
|
|
jpg: 'file-image-o',
|
|
xls: 'file-excel-o',
|
|
xlsx: 'file-excel-o',
|
|
ppt: 'file-powerpoint-o',
|
|
pptx: 'file-powerpoint-o',
|
|
zip: 'file-zip-o'
|
|
};
|
|
|
|
export const getDocumentIcon = extension => {
|
|
return iconTypes[extension] || 'file';
|
|
}; |