@codesinger0/shared-components 1.1.44 → 1.1.46

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.
@@ -60,47 +60,16 @@ const Menu = ({
60
60
  onMenuItemClick(item);
61
61
  };
62
62
 
63
- // Desktop Menu Component
64
63
  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>
71
-
72
- {/* Right side - Menu items and logo */}
73
- <div className="flex items-center space-x-8 space-x-reverse">
74
- {/* Menu items section */}
75
- <div className="flex flex-col items-end mr-8" dir="rtl">
76
- {/* Children above menu items */}
77
- {children && (
78
- <div className="mb-2">
79
- {children}
80
- </div>
81
- )}
82
-
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>
99
- </div>
100
-
101
- {/* Desktop Logo */}
102
- <Link to="/" className={`text-primary font-bold text-xl ml-8 ${logoClassName}`}>
103
- <div className="text-primary font-bold text-xl ml-8">
64
+ <nav className="sticky top-0 z-50 bg-menu border-b-2 border-primary">
65
+ {/* Parent container with two vertically stacked sections */}
66
+ <div className="w-full">
67
+
68
+ {/* Top section - Logo and Children content */}
69
+ {children && (
70
+ <div className="w-full flex items-center py-4 px-6">
71
+ {/* Logo - takes only required space */}
72
+ <Link to="/" className={`flex-shrink-0 ${logoClassName}`}>
104
73
  <div className="relative w-24 h-12 lg:w-32 lg:h-16 overflow-hidden flex items-center justify-center">
105
74
  <img
106
75
  src={businessInfo.logo}
@@ -119,8 +88,37 @@ const Menu = ({
119
88
  {businessInfo.name?.slice(0, 2) || ''}
120
89
  </div>
121
90
  </div>
91
+ </Link>
92
+
93
+ {/* Children - grows to fill available space */}
94
+ <div className="flex-grow">
95
+ {children}
122
96
  </div>
123
- </Link>
97
+ </div>
98
+ )}
99
+
100
+ {/* Bottom section - Menu navigation bar */}
101
+ <div className="w-full px-6 py-4 flex justify-between items-center">
102
+ {/* Left side - Auth buttons */}
103
+ <div className="flex items-center">
104
+ {AuthButtonsComponent && <AuthButtonsComponent />}
105
+ </div>
106
+
107
+ {/* Right side - Menu items */}
108
+ <div className="flex items-center space-x-6 space-x-reverse" dir="rtl">
109
+ {navigationItems.map((item, index) => (
110
+ item.adminRoute && !isAdmin ? null : (
111
+ <Link
112
+ key={index}
113
+ to={item.href}
114
+ onClick={() => handleMenuItemClick(item)}
115
+ 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}`}
116
+ >
117
+ {item.label}
118
+ </Link>
119
+ )
120
+ ))}
121
+ </div>
124
122
  </div>
125
123
  </div>
126
124
  </nav>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codesinger0/shared-components",
3
- "version": "1.1.44",
3
+ "version": "1.1.46",
4
4
  "description": "Shared React components for customer projects",
5
5
  "main": "dist/index.js",
6
6
  "files": [