Skip to content
Snippets Groups Projects
Commit 6bacd1fc authored by Jose Manuel Serrano Amaut's avatar Jose Manuel Serrano Amaut
Browse files

[REF]: Change IconsMap to IconSet

parent a74ea0b0
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ export type FilesUIConfig = {
/**
* Set of icons to override the existing ones
*/
icons?: IconsConfig;
icons?: IconsSet;
/**
* The language in which text labels are shown.
* @default "EN-en"
......@@ -17,4 +17,4 @@ export type FilesUIConfig = {
//fontFamily?:string;
}
export type IconsConfig = IconsMap;
\ No newline at end of file
export type IconsSet = IconsMap;
\ No newline at end of file
export { default as FilesUiProvider } from "./FilesUiProvider";
export * from "./FilesUiProvider";
\ No newline at end of file
export * from "./FilesUiProvider";
export type { IconsSet, FilesUIConfig } from "./FilesUIConfig";
\ No newline at end of file
import * as React from "react";
import { getURLFileIco, readAsDataURL } from "../../../core";
import { getURLFileIcoFromNameAndType } from "../../../core/mime/mime";
import { IconsConfig } from "../../../FilesUiProvider/FilesUIConfig";
import { IconsSet } from "../../../FilesUiProvider";
/**
* Initializer hook for FileItemNeo
......@@ -21,7 +21,7 @@ const useFileMosaicInitializer = (
preview: boolean,
imageUrl: string | undefined,
videoUrl: string | undefined,
customIcons?:IconsConfig,
customIcons?:IconsSet,
xhr?: XMLHttpRequest,
): [boolean, boolean, boolean, string, string | undefined, File | string | undefined] => {
......@@ -42,7 +42,7 @@ const useFileMosaicInitializer = (
preview: boolean,
imageUrl: string | undefined,
videoUrl: string | undefined,
customIcons?:IconsConfig,
customIcons?:IconsSet,
xhr?: XMLHttpRequest,
progress?: number
) => {
......
......@@ -21,7 +21,6 @@ export type IconsMap = {
gzip?: string;
gif?: string;
html?: string;
//ico: ico,
icalendar?: string;
jar?: string;
jpeg?: string;
......@@ -29,7 +28,6 @@ export type IconsMap = {
json?: string;
jsonld?: string;
midi?: string;
// js: js,
mp3?: string;
mp4?: string;
mpeg?: string;
......@@ -52,12 +50,10 @@ export type IconsMap = {
rtf?: string;
sass?: string;
sh?: string;
//svg: svg,
swf?: string;
tar?: string;
tiff?: string;
ttf?: string;
//ts: ts,
typescript?: string;
text?: string;
vsd?: string;
......@@ -73,12 +69,11 @@ export type IconsMap = {
xml?: string;
xul?: string;
zip?: string;
// threegp: threegp,
sevenzip?: string;
python?: string;
java?: string;
react?: string;
vue?: string;
//fallback when file type is not here
fallBack?: string;
}
\ No newline at end of file
......@@ -57,4 +57,7 @@ export type {
export { default as FilesUiProvider } from "./FilesUiProvider/FilesUiProvider";
export * from "./FilesUiProvider/FilesUiProvider";
\ No newline at end of file
export * from "./FilesUiProvider/FilesUiProvider";
export type { IconsSet, FilesUIConfig } from "./FilesUiProvider";
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment