@codesinger0/shared-components 1.1.48 → 1.1.49
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 +26 -1
- package/package.json +1 -1
package/dist/components/Menu.jsx
CHANGED
|
@@ -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 pt-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,6 +94,7 @@ const Menu = ({
|
|
|
94
94
|
{children}
|
|
95
95
|
</div>
|
|
96
96
|
</div>
|
|
97
|
+
)}
|
|
97
98
|
|
|
98
99
|
{/* Bottom section - Menu navigation bar */}
|
|
99
100
|
<div className="w-full px-6 pb-2 flex justify-between items-center">
|
|
@@ -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>
|