MenuButton: add svg icon

This commit is contained in:
He4eT 2023-06-03 23:39:45 +03:00 committed by Alexey
commit d01dd59598
2 changed files with 18 additions and 4 deletions

View file

@ -7,9 +7,15 @@ export default MenuButton = ({ onClick }) => {
<button
aria-label='Menu'
className={s.menuButton}
onClick={() => setMenuOpen(true)}
onClick={onClick}
>
=
<svg
class={s.menuIcon}
viewBox='0 0 24 24'
xmlns='http://www.w3.org/2000/svg'
>
<path d='M10 10h4v4h-4zm0-6h4v4h-4zm0 12h4v4h-4z'/>
</svg>
</button>
)
}

View file

@ -1,14 +1,22 @@
.menuButton {
display: inline-flex;
align-items: center;
justify-content: center;
background: none;
border-left: none;
border: none;
outline-offset: -8px;
position: absolute;
right: 0;
height: 100%;
padding: 0;
aspect-ratio: 1;
&:focus-visible {
outline-offset: -4px;
}
.menuIcon {
height: 32px;
width: 32px;
fill: CurrentColor;
}
}