nvis-fe-cms-libs 2.0.4 → 2.0.5
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.
|
@@ -375,11 +375,12 @@ function ThemeIcon({
|
|
|
375
375
|
name,
|
|
376
376
|
className = "",
|
|
377
377
|
color,
|
|
378
|
+
folder = "common",
|
|
379
|
+
// ← Thêm prop folder, mặc định là "common"
|
|
378
380
|
useOriginalColor = false
|
|
379
|
-
// ← Prop mới để chọn chế độ
|
|
380
381
|
}) {
|
|
381
382
|
if (!name) return null;
|
|
382
|
-
const iconUrl = `/icons/${name}.svg`;
|
|
383
|
+
const iconUrl = `/icons/${folder}/${name}.svg`;
|
|
383
384
|
if (useOriginalColor) {
|
|
384
385
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
385
386
|
"img",
|
|
@@ -389,6 +390,7 @@ function ThemeIcon({
|
|
|
389
390
|
className: `icon ${className}`,
|
|
390
391
|
onError: (e) => {
|
|
391
392
|
e.target.style.display = "none";
|
|
393
|
+
console.warn(`Icon not found: ${iconUrl}`);
|
|
392
394
|
}
|
|
393
395
|
}
|
|
394
396
|
);
|
|
@@ -404,6 +406,7 @@ function ThemeIcon({
|
|
|
404
406
|
},
|
|
405
407
|
onError: (e) => {
|
|
406
408
|
e.target.style.display = "none";
|
|
409
|
+
console.warn(`Icon not found: ${iconUrl}`);
|
|
407
410
|
}
|
|
408
411
|
}
|
|
409
412
|
);
|