@codesinger0/shared-components 1.1.42 → 1.1.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.
- package/dist/components/Menu.jsx +17 -0
- package/package.json +1 -1
package/dist/components/Menu.jsx
CHANGED
|
@@ -25,6 +25,9 @@ const Menu = ({
|
|
|
25
25
|
|
|
26
26
|
// Callbacks
|
|
27
27
|
onMenuItemClick = () => {},
|
|
28
|
+
|
|
29
|
+
// Children to display above menu items
|
|
30
|
+
children = null,
|
|
28
31
|
}) => {
|
|
29
32
|
const [isSidebarOpen, setIsSidebarOpen] = useState(false);
|
|
30
33
|
const isMobile = useMediaQuery({ maxWidth: mobileBreakpoint });
|
|
@@ -70,6 +73,13 @@ const Menu = ({
|
|
|
70
73
|
<div className="flex items-center space-x-8 space-x-reverse">
|
|
71
74
|
{/* Menu items */}
|
|
72
75
|
<div className="flex items-center space-x-6 space-x-reverse mr-8" dir="rtl">
|
|
76
|
+
{/* Children above menu items */}
|
|
77
|
+
{children && (
|
|
78
|
+
<div className="mr-6">
|
|
79
|
+
{children}
|
|
80
|
+
</div>
|
|
81
|
+
)}
|
|
82
|
+
|
|
73
83
|
{navigationItems.map((item, index) => (
|
|
74
84
|
item.adminRoute && !isAdmin ? null : (
|
|
75
85
|
<Link
|
|
@@ -143,6 +153,13 @@ const Menu = ({
|
|
|
143
153
|
</div>
|
|
144
154
|
</Link>
|
|
145
155
|
|
|
156
|
+
{/* Children next to logo */}
|
|
157
|
+
{children && (
|
|
158
|
+
<div>
|
|
159
|
+
{children}
|
|
160
|
+
</div>
|
|
161
|
+
)}
|
|
162
|
+
|
|
146
163
|
{/* Hamburger button */}
|
|
147
164
|
<button
|
|
148
165
|
className="hamburger flex flex-col justify-center items-center w-8 h-8 focus:outline-none text-main"
|