@codesinger0/shared-components 1.1.48 → 1.1.50

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.
@@ -66,7 +66,7 @@ const Menu = ({
66
66
  <div className="w-full">
67
67
 
68
68
  {/* Top section - Logo and Children content */}
69
- <div className="w-full flex items-center pt-4 px-6">
69
+ {children && (<div className="w-full flex items-center py-4 px-6">
70
70
  {/* Logo - takes only required space */}
71
71
  <Link to="/" className={`flex-shrink-0 ${logoClassName}`}>
72
72
  <div className="relative w-24 h-12 lg:w-32 lg:h-16 overflow-hidden flex items-center justify-center">
@@ -94,9 +94,10 @@ const Menu = ({
94
94
  {children}
95
95
  </div>
96
96
  </div>
97
+ )}
97
98
 
98
99
  {/* Bottom section - Menu navigation bar */}
99
- <div className="w-full px-6 pb-2 flex justify-between items-center">
100
+ <div className="w-full px-6 py-4 flex justify-between items-center">
100
101
  {/* Left side - Auth buttons */}
101
102
  <div className="flex items-center">
102
103
  {AuthButtonsComponent && <AuthButtonsComponent />}
@@ -117,6 +118,30 @@ const Menu = ({
117
118
  )
118
119
  ))}
119
120
  </div>
121
+
122
+ {/* Render logo here if no children */}
123
+ {!children && (
124
+ <Link to="/" className={`flex-shrink-0 ${logoClassName}`}>
125
+ <div className="relative w-24 h-12 lg:w-32 lg:h-16 overflow-hidden flex items-center justify-center">
126
+ <img
127
+ src={businessInfo.logo}
128
+ alt={businessInfo.name}
129
+ className="relative z-10 w-full h-full object-contain"
130
+ onError={(e) => {
131
+ e.target.style.display = 'none';
132
+ e.target.nextElementSibling.style.display = 'flex';
133
+ }}
134
+ />
135
+ {/* Fallback text */}
136
+ <div
137
+ className="relative z-10 w-full h-full flex items-center justify-center text-primary text-xs font-bold"
138
+ style={{ display: 'none' }}
139
+ >
140
+ {businessInfo.name?.slice(0, 2) || ''}
141
+ </div>
142
+ </div>
143
+ </Link>
144
+ )}
120
145
  </div>
121
146
  </div>
122
147
  </nav>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codesinger0/shared-components",
3
- "version": "1.1.48",
3
+ "version": "1.1.50",
4
4
  "description": "Shared React components for customer projects",
5
5
  "main": "dist/index.js",
6
6
  "files": [