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.
@@ -378,11 +378,12 @@ var __async = (__this, __arguments, generator) => {
378
378
  name,
379
379
  className = "",
380
380
  color,
381
+ folder = "common",
382
+ // ← Thêm prop folder, mặc định là "common"
381
383
  useOriginalColor = false
382
- // ← Prop mới để chọn chế độ
383
384
  }) {
384
385
  if (!name) return null;
385
- const iconUrl = `/icons/${name}.svg`;
386
+ const iconUrl = `/icons/${folder}/${name}.svg`;
386
387
  if (useOriginalColor) {
387
388
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
388
389
  "img",
@@ -392,6 +393,7 @@ var __async = (__this, __arguments, generator) => {
392
393
  className: `icon ${className}`,
393
394
  onError: (e) => {
394
395
  e.target.style.display = "none";
396
+ console.warn(`Icon not found: ${iconUrl}`);
395
397
  }
396
398
  }
397
399
  );
@@ -407,6 +409,7 @@ var __async = (__this, __arguments, generator) => {
407
409
  },
408
410
  onError: (e) => {
409
411
  e.target.style.display = "none";
412
+ console.warn(`Icon not found: ${iconUrl}`);
410
413
  }
411
414
  }
412
415
  );