File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import './header.scss' ;
22
3- import { Menu , Search } from 'lucide-react' ;
3+ import { Menu , Search , X } from 'lucide-react' ;
44import React , { useEffect , useState } from 'react' ;
55import { Link , useHistory } from 'react-router-dom' ;
66import { NavLink } from 'react-router-dom' ;
@@ -135,6 +135,9 @@ export const Header = ({ capabilities }: HeaderProps) => {
135135 < div className = { `navbar__overlay ${ isMobileMenuOpen ? 'is-open' : '' } ` } onClick = { closeMobileMenu } > </ div >
136136
137137 < div className = { `navbar__mobile-menu ${ isMobileMenuOpen ? 'is-open' : '' } ` } >
138+ < button className = "mobile-menu-close" onClick = { closeMobileMenu } >
139+ < X size = { 24 } />
140+ </ button >
138141 < div className = "mobile-search-container" >
139142 < SearchBar />
140143 </ div >
Original file line number Diff line number Diff line change 173173 }
174174}
175175
176+ .mobile-menu-close {
177+ position : absolute ;
178+ top : 1rem ;
179+ right : 1rem ;
180+ background : transparent ;
181+ border : none ;
182+ cursor : pointer ;
183+ color : white ;
184+ z-index :100 ;
185+ }
186+
176187.navbar__mobile-menu {
177188 position : fixed ;
178189 top : 0 ;
179190 right : 0 ;
180191 width : 300px ;
181- height : 100 % ;
192+ height : fit-content ;
182193 background-color : var (--background );
183194 border-left : 1px solid var (--border );
184195 padding : 1rem ;
You can’t perform that action at this time.
0 commit comments