@fixefy/fixefy-ui-components 0.3.44 → 0.3.46
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/dist/FxIcon/FxIcon.d.ts +1 -2
- package/dist/FxIcon/FxIcon.js +9 -21
- package/package.json +3 -3
package/dist/FxIcon/FxIcon.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const FxIcon: ({ icon, width, height, onClick, variant, fontSize, background, initials,
|
|
1
|
+
export declare const FxIcon: ({ icon, width, height, onClick, variant, fontSize, background, initials, }: {
|
|
2
2
|
icon: string;
|
|
3
3
|
width: number;
|
|
4
4
|
height: number;
|
|
@@ -7,5 +7,4 @@ export declare const FxIcon: ({ icon, width, height, onClick, variant, fontSize,
|
|
|
7
7
|
fontSize?: number;
|
|
8
8
|
background?: string;
|
|
9
9
|
initials?: string;
|
|
10
|
-
path?: string;
|
|
11
10
|
}) => JSX.Element;
|
package/dist/FxIcon/FxIcon.js
CHANGED
|
@@ -59,7 +59,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
59
59
|
}
|
|
60
60
|
return newObj;
|
|
61
61
|
}
|
|
62
|
-
const PublicIcon = ({ icon, width, height, onClick, variant, fontSize, background, initials
|
|
62
|
+
const PublicIcon = ({ icon, width, height, onClick, variant, fontSize, background, initials })=>{
|
|
63
63
|
const [isError, setError] = (0, _react.useState)(false);
|
|
64
64
|
const handleError = (isError)=>setError(isError);
|
|
65
65
|
if (isError) {
|
|
@@ -81,27 +81,17 @@ const PublicIcon = ({ icon, width, height, onClick, variant, fontSize, backgroun
|
|
|
81
81
|
alt: "",
|
|
82
82
|
width: width,
|
|
83
83
|
height: height,
|
|
84
|
-
loader: ()
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
src: icon
|
|
89
|
-
});
|
|
90
|
-
} else {
|
|
91
|
-
return (0, _fixefyuiutils.imageLoader)({
|
|
92
|
-
src: icon,
|
|
93
|
-
//@ts-ignore
|
|
94
|
-
path
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
},
|
|
84
|
+
loader: ()=>//@ts-ignore
|
|
85
|
+
(0, _fixefyuiutils.imageLoader)({
|
|
86
|
+
src: icon
|
|
87
|
+
}),
|
|
98
88
|
src: icon,
|
|
99
89
|
onLoad: ()=>handleError(false),
|
|
100
90
|
onError: ()=>handleError(true),
|
|
101
91
|
onClick: onClick
|
|
102
92
|
});
|
|
103
93
|
};
|
|
104
|
-
const FxIcon = ({ icon, width, height, onClick, variant, fontSize, background, initials
|
|
94
|
+
const FxIcon = ({ icon, width, height, onClick, variant, fontSize, background, initials })=>{
|
|
105
95
|
if (!icon) throw Error('Provide a property `icon`');
|
|
106
96
|
return parseIconFromLibrary({
|
|
107
97
|
icon,
|
|
@@ -111,11 +101,10 @@ const FxIcon = ({ icon, width, height, onClick, variant, fontSize, background, i
|
|
|
111
101
|
variant,
|
|
112
102
|
fontSize,
|
|
113
103
|
background,
|
|
114
|
-
initials
|
|
115
|
-
path
|
|
104
|
+
initials
|
|
116
105
|
});
|
|
117
106
|
};
|
|
118
|
-
const parseIconFromLibrary = ({ icon, width, height, onClick, variant, fontSize, background, initials
|
|
107
|
+
const parseIconFromLibrary = ({ icon, width, height, onClick, variant, fontSize, background, initials })=>{
|
|
119
108
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(PublicIcon, {
|
|
120
109
|
icon: icon,
|
|
121
110
|
width: width,
|
|
@@ -124,7 +113,6 @@ const parseIconFromLibrary = ({ icon, width, height, onClick, variant, fontSize,
|
|
|
124
113
|
variant: variant,
|
|
125
114
|
fontSize: fontSize,
|
|
126
115
|
background: background,
|
|
127
|
-
initials: initials
|
|
128
|
-
path: path
|
|
116
|
+
initials: initials
|
|
129
117
|
});
|
|
130
118
|
};
|
package/package.json
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@apollo/client": "3.10.4",
|
|
8
|
-
"@fixefy/fixefy-hooks": "0.0.
|
|
9
|
-
"@fixefy/fixefy-ui-utils": "0.2.
|
|
8
|
+
"@fixefy/fixefy-hooks": "0.0.11",
|
|
9
|
+
"@fixefy/fixefy-ui-utils": "0.2.54",
|
|
10
10
|
"@mui/icons-material": "5.16.7",
|
|
11
11
|
"@mui/lab": "6.0.0-beta.7",
|
|
12
12
|
"@mui/material": "5.16.7",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"require": "./dist/index.js"
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
|
-
"version": "0.3.
|
|
71
|
+
"version": "0.3.46"
|
|
72
72
|
}
|