Skip to content

Commit 3630215

Browse files
committed
style(MainHeader): hide labels and buttons on smaller screens for cleaner layout
- Added `lg:inline` and `lg:block` classes to selectively display labels and buttons on larger screens - Improved responsive design for a better user experience on smaller devices
1 parent b4bfefd commit 3630215

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/components/MainHeader.jsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export function MainHeader(props) {
141141
<svg className="h-5 w-5">
142142
<use xlinkHref="#icon-plus" />
143143
</svg>
144-
<span>New</span>
144+
<span className="hidden lg:inline">New</span>
145145
</button>
146146
<button
147147
id="openItemsBtn"
@@ -154,7 +154,7 @@ export function MainHeader(props) {
154154
<svg className="h-5 w-5">
155155
<use xlinkHref="#icon-gallery" />
156156
</svg>
157-
<span>My library</span>
157+
<span className="hidden lg:inline">My library</span>
158158
</button>
159159
</div>
160160
<div>
@@ -193,7 +193,7 @@ export function MainHeader(props) {
193193

194194
{!window.user ? (
195195
<button
196-
className="h-10 px-4 bg-primary rounded-lg text-gray-100 font-semibold hover:opacity-80 duration-200"
196+
className="hidden lg:inline h-10 px-4 bg-primary rounded-lg text-gray-100 font-semibold hover:opacity-80 duration-200"
197197
aria-label="Share diagram link"
198198
onClick={props.onLogin.bind(this)}
199199
>
@@ -208,7 +208,7 @@ export function MainHeader(props) {
208208
onVisibilityChange={setIsSharePanelVisible}
209209
trigger={
210210
<button
211-
className="h-10 px-4 bg-primary rounded-lg text-white font-semibold hover:opacity-80 duration-200"
211+
className="hidden lg:inline h-10 px-4 bg-primary rounded-lg text-white font-semibold hover:opacity-80 duration-200"
212212
aria-label="Share diagram link"
213213
onClick={shareClickHandler}
214214
>
@@ -225,10 +225,12 @@ export function MainHeader(props) {
225225
/>
226226
)}
227227
{featureToggle.isPaymentEnabled ? (
228-
<ProductVersionLabel
229-
user={props.user}
230-
clickHandler={props.proBtnHandler}
231-
/>
228+
<div className="hidden lg:block">
229+
<ProductVersionLabel
230+
user={props.user}
231+
clickHandler={props.proBtnHandler}
232+
/>
233+
</div>
232234
) : null}
233235

234236
{props.user ? (

0 commit comments

Comments
 (0)