Skip to content

Commit 26a6f80

Browse files
author
Shawn Toubeau
committed
hides menu icons at small resolutions
1 parent 7edcef0 commit 26a6f80

File tree

2 files changed

+47
-8
lines changed

2 files changed

+47
-8
lines changed

src/components/Menu/Menu.scss

+12
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
text-align: center !important;
1212
background-color: #e03997 !important;
1313
color: white !important;
14+
margin-right: 0 !important;
1415

1516
i {
1617
display: none;
@@ -35,3 +36,14 @@
3536
padding-right: 15px;
3637
}
3738
}
39+
40+
.info {
41+
margin-left: 0 !important;
42+
margin-right: 0 !important;
43+
}
44+
45+
@media only screen and (max-width: 1120px) {
46+
.hidden-icon {
47+
display: none !important;
48+
}
49+
}

src/components/Menu/index.tsx

+35-8
Original file line numberDiff line numberDiff line change
@@ -271,18 +271,30 @@ class MenuBar extends React.Component<MenuProps, _MenuState> {
271271
<Menu.Item>
272272
{!isPlaying ? (
273273
<Button color="green" circular onClick={onStart}>
274-
<Icon name="play" style={{ marginRight: "0.5rem" }} />
274+
<Icon
275+
name="play"
276+
style={{ marginRight: "0.5rem" }}
277+
className="hidden-icon"
278+
/>
275279
<span>Play</span>
276280
</Button>
277281
) : (
278282
<Button circular onClick={onPause}>
279-
<Icon name="pause" style={{ marginRight: "0.5rem" }} />
283+
<Icon
284+
name="pause"
285+
style={{ marginRight: "0.5rem" }}
286+
className="hidden-icon"
287+
/>
280288
<span>Pause</span>
281289
</Button>
282290
)}
283291
&nbsp; {/* Essentially just a fancy space */}
284292
<Button color="red" circular onClick={onStop}>
285-
<Icon name="stop" style={{ marginRight: "0.5rem" }} />
293+
<Icon
294+
name="stop"
295+
style={{ marginRight: "0.5rem" }}
296+
className="hidden-icon"
297+
/>
286298
<span>Stop</span>
287299
</Button>
288300
{/* TODO: fix */}
@@ -326,7 +338,11 @@ class MenuBar extends React.Component<MenuProps, _MenuState> {
326338
onClick={randomizeWalls}
327339
disabled={isPlaying}
328340
>
329-
<Icon name="table" style={{ marginRight: "0.5rem" }} />
341+
<Icon
342+
name="table"
343+
style={{ marginRight: "0.5rem" }}
344+
className="hidden-icon"
345+
/>
330346
<span>Randomize Walls</span>
331347
</Button>
332348
&nbsp; {/* Essentially just a fancy space */}
@@ -336,7 +352,11 @@ class MenuBar extends React.Component<MenuProps, _MenuState> {
336352
onClick={onClear}
337353
disabled={isPlaying}
338354
>
339-
<Icon name="bomb" style={{ marginRight: "0.5rem" }} />
355+
<Icon
356+
name="bomb"
357+
style={{ marginRight: "0.5rem" }}
358+
className="hidden-icon"
359+
/>
340360
<span>Clear Grid</span>
341361
</Button>
342362
&nbsp; {/* Essentially just a fancy space */}
@@ -347,7 +367,11 @@ class MenuBar extends React.Component<MenuProps, _MenuState> {
347367
className="save-modal"
348368
trigger={
349369
<Button color="blue" circular disabled={isPlaying}>
350-
<Icon name="save outline" style={{ marginRight: "0.5rem" }} />
370+
<Icon
371+
name="save outline"
372+
style={{ marginRight: "0.5rem" }}
373+
className="hidden-icon"
374+
/>
351375
<span>Save Maze</span>
352376
</Button>
353377
}
@@ -374,7 +398,11 @@ class MenuBar extends React.Component<MenuProps, _MenuState> {
374398
centered={false}
375399
trigger={
376400
<Button color="blue" circular disabled={isPlaying}>
377-
<Icon name="upload" style={{ marginRight: "0.5rem" }} />
401+
<Icon
402+
name="upload"
403+
style={{ marginRight: "0.5rem" }}
404+
className="hidden-icon"
405+
/>
378406
<span>Load Maze</span>
379407
</Button>
380408
}
@@ -536,7 +564,6 @@ class MenuBar extends React.Component<MenuProps, _MenuState> {
536564
</Button>
537565
</Dropdown.Menu>
538566
</Dropdown>
539-
&nbsp; {/* Essentially just a fancy space */}
540567
</Message>
541568
</div>
542569
);

0 commit comments

Comments
 (0)