@codesinger0/shared-components 1.1.45 → 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,16 +60,40 @@ const Menu = ({
60
60
  onMenuItemClick(item);
61
61
  };
62
62
 
63
- // Desktop Menu Component
64
63
  const DesktopMenu = () => (
65
64
  <nav className="sticky top-0 z-50 bg-menu border-b-2 border-primary">
66
65
  {/* Parent container with two vertically stacked sections */}
67
66
  <div className="w-full">
68
67
 
69
- {/* Top section - Children content (full width) */}
68
+ {/* Top section - Logo and Children content */}
70
69
  {children && (
71
- <div className="w-full">
72
- {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}`}>
73
+ <div className="relative w-24 h-12 lg:w-32 lg:h-16 overflow-hidden flex items-center justify-center">
74
+ <img
75
+ src={businessInfo.logo}
76
+ alt={businessInfo.name}
77
+ className="relative z-10 w-full h-full object-contain"
78
+ onError={(e) => {
79
+ e.target.style.display = 'none';
80
+ e.target.nextElementSibling.style.display = 'flex';
81
+ }}
82
+ />
83
+ {/* Fallback text */}
84
+ <div
85
+ className="relative z-10 w-full h-full flex items-center justify-center text-primary text-xs font-bold"
86
+ style={{ display: 'none' }}
87
+ >
88
+ {businessInfo.name?.slice(0, 2) || ''}
89
+ </div>
90
+ </div>
91
+ </Link>
92
+
93
+ {/* Children - grows to fill available space */}
94
+ <div className="flex-grow">
95
+ {children}
96
+ </div>
73
97
  </div>
74
98
  )}
75
99
 
@@ -80,7 +104,7 @@ const Menu = ({
80
104
  {AuthButtonsComponent && <AuthButtonsComponent />}
81
105
  </div>
82
106
 
83
- {/* Center - Menu items */}
107
+ {/* Right side - Menu items */}
84
108
  <div className="flex items-center space-x-6 space-x-reverse" dir="rtl">
85
109
  {navigationItems.map((item, index) => (
86
110
  item.adminRoute && !isAdmin ? null : (
@@ -95,30 +119,6 @@ const Menu = ({
95
119
  )
96
120
  ))}
97
121
  </div>
98
-
99
- {/* Right side - Logo */}
100
- <Link to="/" className={`text-primary font-bold text-xl ml-8 ${logoClassName}`}>
101
- <div className="text-primary font-bold text-xl ml-8">
102
- <div className="relative w-24 h-12 lg:w-32 lg:h-16 overflow-hidden flex items-center justify-center">
103
- <img
104
- src={businessInfo.logo}
105
- alt={businessInfo.name}
106
- className="relative z-10 w-full h-full object-contain"
107
- onError={(e) => {
108
- e.target.style.display = 'none';
109
- e.target.nextElementSibling.style.display = 'flex';
110
- }}
111
- />
112
- {/* Fallback text */}
113
- <div
114
- className="relative z-10 w-full h-full flex items-center justify-center text-primary text-xs font-bold"
115
- style={{ display: 'none' }}
116
- >
117
- {businessInfo.name?.slice(0, 2) || ''}
118
- </div>
119
- </div>
120
- </div>
121
- </Link>
122
122
  </div>
123
123
  </div>
124
124
  </nav>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codesinger0/shared-components",
3
- "version": "1.1.45",
3
+ "version": "1.1.46",
4
4
  "description": "Shared React components for customer projects",
5
5
  "main": "dist/index.js",
6
6
  "files": [