@fixefy/fixefy-ui-components 0.3.42 → 0.3.43

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.
@@ -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, path })=>{
63
63
  const [isError, setError] = (0, _react.useState)(false);
64
64
  const handleError = (isError)=>setError(isError);
65
65
  if (isError) {
@@ -81,10 +81,20 @@ const PublicIcon = ({ icon, width, height, onClick, variant, fontSize, backgroun
81
81
  alt: "",
82
82
  width: width,
83
83
  height: height,
84
- loader: ()=>//@ts-ignore
85
- (0, _fixefyuiutils.imageLoader)({
86
- src: icon
87
- }),
84
+ loader: ()=>{
85
+ if (path) {
86
+ //@ts-ignore
87
+ return (0, _fixefyuiutils.imageLoader)({
88
+ src: icon
89
+ });
90
+ } else {
91
+ return (0, _fixefyuiutils.imageLoader)({
92
+ src: icon,
93
+ //@ts-ignore
94
+ path
95
+ });
96
+ }
97
+ },
88
98
  src: icon,
89
99
  onLoad: ()=>handleError(false),
90
100
  onError: ()=>handleError(true),
package/package.json CHANGED
@@ -68,5 +68,5 @@
68
68
  "require": "./dist/index.js"
69
69
  }
70
70
  },
71
- "version": "0.3.42"
71
+ "version": "0.3.43"
72
72
  }