@codesinger0/shared-components 1.1.43 → 1.1.45

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.
@@ -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
  }) => {
@@ -62,24 +62,26 @@ const Menu = ({
62
62
 
63
63
  // Desktop Menu Component
64
64
  const DesktopMenu = () => (
65
- <nav className="sticky top-0 z-50 bg-menu py-4 border-b-2 border-primary">
66
- <div className="w-full px-6 flex justify-between items-center">
67
- {/* Left side - Auth buttons */}
68
- <div className="flex items-center">
69
- {AuthButtonsComponent && <AuthButtonsComponent />}
70
- </div>
65
+ <nav className="sticky top-0 z-50 bg-menu border-b-2 border-primary">
66
+ {/* Parent container with two vertically stacked sections */}
67
+ <div className="w-full">
68
+
69
+ {/* Top section - Children content (full width) */}
70
+ {children && (
71
+ <div className="w-full">
72
+ {children}
73
+ </div>
74
+ )}
71
75
 
72
- {/* Right side - Menu items and logo */}
73
- <div className="flex items-center space-x-8 space-x-reverse">
74
- {/* Menu items */}
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
- )}
76
+ {/* Bottom section - Menu navigation bar */}
77
+ <div className="w-full px-6 py-4 flex justify-between items-center">
78
+ {/* Left side - Auth buttons */}
79
+ <div className="flex items-center">
80
+ {AuthButtonsComponent && <AuthButtonsComponent />}
81
+ </div>
82
82
 
83
+ {/* Center - Menu items */}
84
+ <div className="flex items-center space-x-6 space-x-reverse" dir="rtl">
83
85
  {navigationItems.map((item, index) => (
84
86
  item.adminRoute && !isAdmin ? null : (
85
87
  <Link
@@ -94,7 +96,7 @@ const Menu = ({
94
96
  ))}
95
97
  </div>
96
98
 
97
- {/* Desktop Logo */}
99
+ {/* Right side - Logo */}
98
100
  <Link to="/" className={`text-primary font-bold text-xl ml-8 ${logoClassName}`}>
99
101
  <div className="text-primary font-bold text-xl ml-8">
100
102
  <div className="relative w-24 h-12 lg:w-32 lg:h-16 overflow-hidden flex items-center justify-center">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codesinger0/shared-components",
3
- "version": "1.1.43",
3
+ "version": "1.1.45",
4
4
  "description": "Shared React components for customer projects",
5
5
  "main": "dist/index.js",
6
6
  "files": [