@linagora/twake-icons 2.5.0 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/utils/getFileTypeIcon.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# @linagora/twake-icons [2.6.0](https://github.com/linagora/twake-ui/compare/@linagora/twake-icons@2.5.0...@linagora/twake-icons@2.6.0) (2026-06-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **twake-icons:** Change TS config to target ES2019 ([3ddd5c5](https://github.com/linagora/twake-ui/commit/3ddd5c56e0cb3fadd7fd8b5ef17b9034fbbce828))
|
|
7
|
+
|
|
1
8
|
# @linagora/twake-icons [2.5.0](https://github.com/linagora/twake-ui/compare/@linagora/twake-icons@2.4.1...@linagora/twake-icons@2.5.0) (2026-06-22)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -8,7 +8,7 @@ import { mimeToIcon, defaultIcon } from './fileTypeIcons';
|
|
|
8
8
|
* @returns React node representing the file type icon
|
|
9
9
|
*/
|
|
10
10
|
export function getFileTypeIcon(filename, mimeType) {
|
|
11
|
-
const resolvedMimeType = mimeType
|
|
11
|
+
const resolvedMimeType = (mimeType === null || mimeType === void 0 ? void 0 : mimeType.split(';')[0].trim().toLowerCase()) || mime.getType(filename);
|
|
12
12
|
if (resolvedMimeType && mimeToIcon[resolvedMimeType]) {
|
|
13
13
|
return mimeToIcon[resolvedMimeType];
|
|
14
14
|
}
|