@codesinger0/shared-components 1.1.43 → 1.1.44
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/components/Menu.jsx +26 -22
- package/package.json +1 -1
package/dist/components/Menu.jsx
CHANGED
|
@@ -7,25 +7,25 @@ import useScrollLock from '../hooks/useScrollLock';
|
|
|
7
7
|
const Menu = ({
|
|
8
8
|
// Business info
|
|
9
9
|
businessInfo = {},
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
// Navigation items
|
|
12
12
|
navigationItems = [],
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
// Auth/Action buttons component
|
|
15
15
|
AuthButtonsComponent = null,
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
// User context (for admin check)
|
|
18
18
|
isAdmin = false,
|
|
19
|
-
|
|
19
|
+
|
|
20
20
|
// Customization
|
|
21
21
|
mobileBreakpoint = 900,
|
|
22
22
|
logoClassName = '',
|
|
23
23
|
menuItemClassName = '',
|
|
24
24
|
sidebarWidth = 'w-80',
|
|
25
|
-
|
|
25
|
+
|
|
26
26
|
// Callbacks
|
|
27
|
-
onMenuItemClick = () => {},
|
|
28
|
-
|
|
27
|
+
onMenuItemClick = () => { },
|
|
28
|
+
|
|
29
29
|
// Children to display above menu items
|
|
30
30
|
children = null,
|
|
31
31
|
}) => {
|
|
@@ -71,27 +71,31 @@ const Menu = ({
|
|
|
71
71
|
|
|
72
72
|
{/* Right side - Menu items and logo */}
|
|
73
73
|
<div className="flex items-center space-x-8 space-x-reverse">
|
|
74
|
-
{/* Menu items */}
|
|
75
|
-
<div className="flex
|
|
74
|
+
{/* Menu items section */}
|
|
75
|
+
<div className="flex flex-col items-end mr-8" dir="rtl">
|
|
76
76
|
{/* Children above menu items */}
|
|
77
77
|
{children && (
|
|
78
|
-
<div className="
|
|
78
|
+
<div className="mb-2">
|
|
79
79
|
{children}
|
|
80
80
|
</div>
|
|
81
81
|
)}
|
|
82
82
|
|
|
83
|
-
{
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
83
|
+
{/* Menu items - horizontal */}
|
|
84
|
+
<div className="flex items-center space-x-6 space-x-reverse">
|
|
85
|
+
|
|
86
|
+
{navigationItems.map((item, index) => (
|
|
87
|
+
item.adminRoute && !isAdmin ? null : (
|
|
88
|
+
<Link
|
|
89
|
+
key={index}
|
|
90
|
+
to={item.href}
|
|
91
|
+
onClick={() => handleMenuItemClick(item)}
|
|
92
|
+
className={`subtitle font-normal cursor-pointer menu-item-hover px-4 py-2 rounded-md text transition-colors duration-500 ease-in-out hover:text-primary ${menuItemClassName}`}
|
|
93
|
+
>
|
|
94
|
+
{item.label}
|
|
95
|
+
</Link>
|
|
96
|
+
)
|
|
97
|
+
))}
|
|
98
|
+
</div>
|
|
95
99
|
</div>
|
|
96
100
|
|
|
97
101
|
{/* Desktop Logo */}
|