2018-10-03 16:46:41 +02:00
|
|
|
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',
|
2018-11-07 03:05:54 +01:00
|
|
|
pptx: 'file-powerpoint-o',
|
|
|
|
|
zip: 'file-zip-o'
|
2018-10-03 16:46:41 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const getDocumentIcon = extension => {
|
|
|
|
|
return iconTypes[extension] || 'file';
|
|
|
|
|
};
|