Skip to content

Commit

Permalink
fix: close button of menu in mobile showing when menu is closed (#491)
Browse files Browse the repository at this point in the history
* fix: close button of menu in mobile showing when menu is closed

* fix: used style instead of conditional rendering
  • Loading branch information
sabrina-bongiovanni authored Jan 19, 2024
1 parent 39a54be commit e398437
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@

- Risolto un problema di visualizzazione di alcune icone social.
- Risolto un problema con il menù di navigazione del footer, in cui a volte scomparivano le voci di secondo livello.
- Risolto problema di sovrapposizione del bottone "Chiudi" del menu laterale su mobile quando il menu è chiuso.

## Versione 11.3.0 (16/01/2024)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ const Navigation = ({ pathname }) => {
document.body.removeEventListener('click', blocksClickListener);
}, []);

const closeButtonStyle = collapseOpen
? {
display: 'block',
}
: { display: 'none' };

return (
<Header theme="" type="navbar">
{menu?.length > 0 ? (
Expand Down Expand Up @@ -148,7 +154,7 @@ const Navigation = ({ pathname }) => {
{/* Headerslim Menu - parent site (if subsite) */}
{subsite && <ParentSiteMenu />}
</div>
<div className="close-div">
<div className="close-div" style={closeButtonStyle}>
<button
className="btn close-menu"
type="button"
Expand Down

0 comments on commit e398437

Please sign in to comment.