next-recomponents 2.0.51 → 2.0.52

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/index.js CHANGED
@@ -3694,13 +3694,14 @@ function Container({
3694
3694
  { location: "/", name: "Home", icon: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(HomeIcon, {}) },
3695
3695
  ...navItems
3696
3696
  ].map((li, k) => {
3697
+ const icono = menuList == null ? void 0 : menuList.find((m) => m.location == li.location);
3697
3698
  return li && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
3698
3699
  import_link.default,
3699
3700
  {
3700
3701
  href: li.location,
3701
3702
  className: "flex gap-1 p-1 items-center",
3702
3703
  children: [
3703
- li.icon,
3704
+ (li == null ? void 0 : li.icon) || icono,
3704
3705
  li.name
3705
3706
  ]
3706
3707
  },
@@ -3745,11 +3746,11 @@ function Container({
3745
3746
  {
3746
3747
  href: (itemMenu == null ? void 0 : itemMenu.location) || "#",
3747
3748
  children: [
3748
- isSidebarOpen && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "text-sm flex p-1 gap-1 items-center hover:bg-gray-200 hover:text-black rounded", children: [
3749
+ isSidebarOpen && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "text-sm flex items-center hover:bg-gray-200 hover:text-black rounded p-1", children: [
3749
3750
  icon,
3750
3751
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: " truncate", children: itemMenu == null ? void 0 : itemMenu.name })
3751
3752
  ] }),
3752
- !isSidebarOpen && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "text-sm hover:bg-gray-200 hover:text-black rounded p-1", children: icon })
3753
+ !isSidebarOpen && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "text-sm flex hover:bg-gray-200 hover:text-black rounded p-1", children: icon })
3753
3754
  ]
3754
3755
  }
3755
3756
  ) }, k);
package/dist/index.mjs CHANGED
@@ -3668,13 +3668,14 @@ function Container({
3668
3668
  { location: "/", name: "Home", icon: /* @__PURE__ */ jsx3(HomeIcon, {}) },
3669
3669
  ...navItems
3670
3670
  ].map((li, k) => {
3671
+ const icono = menuList == null ? void 0 : menuList.find((m) => m.location == li.location);
3671
3672
  return li && /* @__PURE__ */ jsxs2(
3672
3673
  import_link.default,
3673
3674
  {
3674
3675
  href: li.location,
3675
3676
  className: "flex gap-1 p-1 items-center",
3676
3677
  children: [
3677
- li.icon,
3678
+ (li == null ? void 0 : li.icon) || icono,
3678
3679
  li.name
3679
3680
  ]
3680
3681
  },
@@ -3719,11 +3720,11 @@ function Container({
3719
3720
  {
3720
3721
  href: (itemMenu == null ? void 0 : itemMenu.location) || "#",
3721
3722
  children: [
3722
- isSidebarOpen && /* @__PURE__ */ jsxs2("div", { className: "text-sm flex p-1 gap-1 items-center hover:bg-gray-200 hover:text-black rounded", children: [
3723
+ isSidebarOpen && /* @__PURE__ */ jsxs2("div", { className: "text-sm flex items-center hover:bg-gray-200 hover:text-black rounded p-1", children: [
3723
3724
  icon,
3724
3725
  /* @__PURE__ */ jsx3("div", { className: " truncate", children: itemMenu == null ? void 0 : itemMenu.name })
3725
3726
  ] }),
3726
- !isSidebarOpen && /* @__PURE__ */ jsx3("div", { className: "text-sm hover:bg-gray-200 hover:text-black rounded p-1", children: icon })
3727
+ !isSidebarOpen && /* @__PURE__ */ jsx3("div", { className: "text-sm flex hover:bg-gray-200 hover:text-black rounded p-1", children: icon })
3727
3728
  ]
3728
3729
  }
3729
3730
  ) }, k);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-recomponents",
3
- "version": "2.0.51",
3
+ "version": "2.0.52",
4
4
  "description": "description nueva",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -66,6 +66,7 @@ export default function Container({
66
66
  { location: "/", name: "Home", icon: <HomeIcon /> },
67
67
  ...navItems,
68
68
  ].map((li, k) => {
69
+ const icono = menuList?.find((m) => m.location == li.location);
69
70
  return (
70
71
  li && (
71
72
  <Link
@@ -73,7 +74,7 @@ export default function Container({
73
74
  key={k}
74
75
  className="flex gap-1 p-1 items-center"
75
76
  >
76
- {li.icon as any}
77
+ {(li?.icon as any) || icono}
77
78
  {li.name as any}
78
79
  </Link>
79
80
  )
@@ -129,13 +130,13 @@ export default function Container({
129
130
  // onClick={() => setIsSidebarOpen(false)}
130
131
  >
131
132
  {isSidebarOpen && (
132
- <div className="text-sm flex p-1 gap-1 items-center hover:bg-gray-200 hover:text-black rounded">
133
+ <div className="text-sm flex items-center hover:bg-gray-200 hover:text-black rounded p-1">
133
134
  {icon}
134
135
  <div className=" truncate">{itemMenu?.name}</div>
135
136
  </div>
136
137
  )}
137
138
  {!isSidebarOpen && (
138
- <div className="text-sm hover:bg-gray-200 hover:text-black rounded p-1">
139
+ <div className="text-sm flex hover:bg-gray-200 hover:text-black rounded p-1">
139
140
  {icon}
140
141
  </div>
141
142
  )}