File tree Expand file tree Collapse file tree 2 files changed +27
-19
lines changed Expand file tree Collapse file tree 2 files changed +27
-19
lines changed Original file line number Diff line number Diff line change 1
- import { Breakpoint , IconName } from '~/libs/enums/enums.js' ;
1
+ import { IconName } from '~/libs/enums/enums.js' ;
2
2
import { getValidClassNames } from '~/libs/helpers/helpers.js' ;
3
3
import {
4
4
useCallback ,
@@ -54,8 +54,6 @@ const BurgerMenu: React.FC<Properties> = ({ burgerItems }: Properties) => {
54
54
} ;
55
55
} , [ ] ) ;
56
56
57
- const isMobile = window . innerWidth <= Breakpoint . MOBILE ;
58
-
59
57
return (
60
58
< div
61
59
ref = { menuReference }
@@ -71,21 +69,18 @@ const BurgerMenu: React.FC<Properties> = ({ burgerItems }: Properties) => {
71
69
< ul >
72
70
{ burgerItems . map ( ( item , index ) => (
73
71
< li key = { index } >
74
- { isMobile ? (
75
- < Icon
76
- iconName = { item . icon }
77
- onClick = { handleNavigate ( item . navigateTo ) }
78
- className = { styles . menuIcon }
79
- />
80
- ) : (
81
- < Button
82
- frontIcon = { item . icon }
83
- isFullWidth
84
- label = { item . name }
85
- onClick = { handleNavigate ( item . navigateTo ) }
86
- className = { styles . btn }
87
- />
88
- ) }
72
+ < Icon
73
+ iconName = { item . icon }
74
+ onClick = { handleNavigate ( item . navigateTo ) }
75
+ className = { styles . menuIcon }
76
+ />
77
+ < Button
78
+ frontIcon = { item . icon }
79
+ isFullWidth
80
+ label = { item . name }
81
+ onClick = { handleNavigate ( item . navigateTo ) }
82
+ className = { styles . btn }
83
+ />
89
84
</ li >
90
85
) ) }
91
86
</ ul >
Original file line number Diff line number Diff line change 26
26
border-radius : 16px ;
27
27
28
28
.btn {
29
- display : inline-flex ;
30
29
justify-content : start ;
31
30
background-color : $blue-dark ;
32
31
border-radius : 0 ;
48
47
width : 80px ;
49
48
background-color : $blue-dark ;
50
49
50
+ .btn {
51
+ display : none ;
52
+ }
53
+
51
54
li {
52
55
padding : 10px 20px ;
53
56
57
60
}
58
61
}
59
62
}
63
+
64
+ @media (width > $screen-size-lg ) {
65
+ .btn {
66
+ display : inline-flex ;
67
+ }
68
+
69
+ .menuIcon {
70
+ display : none ;
71
+ }
72
+ }
You can’t perform that action at this time.
0 commit comments