mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-08 06:37:18 +02:00
fix(v2): hide mobile navbar hamburger when there are no links (#2624)
This commit is contained in:
parent
614adca45f
commit
409f8788dc
1 changed files with 26 additions and 24 deletions
|
@ -140,30 +140,32 @@ function Navbar() {
|
||||||
})}>
|
})}>
|
||||||
<div className="navbar__inner">
|
<div className="navbar__inner">
|
||||||
<div className="navbar__items">
|
<div className="navbar__items">
|
||||||
<div
|
{links != null && links.length !== 0 && (
|
||||||
aria-label="Navigation bar toggle"
|
<div
|
||||||
className="navbar__toggle"
|
aria-label="Navigation bar toggle"
|
||||||
role="button"
|
className="navbar__toggle"
|
||||||
tabIndex={0}
|
role="button"
|
||||||
onClick={showSidebar}
|
tabIndex={0}
|
||||||
onKeyDown={showSidebar}>
|
onClick={showSidebar}
|
||||||
<svg
|
onKeyDown={showSidebar}>
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
<svg
|
||||||
width="30"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
height="30"
|
width="30"
|
||||||
viewBox="0 0 30 30"
|
height="30"
|
||||||
role="img"
|
viewBox="0 0 30 30"
|
||||||
focusable="false">
|
role="img"
|
||||||
<title>Menu</title>
|
focusable="false">
|
||||||
<path
|
<title>Menu</title>
|
||||||
stroke="currentColor"
|
<path
|
||||||
strokeLinecap="round"
|
stroke="currentColor"
|
||||||
strokeMiterlimit="10"
|
strokeLinecap="round"
|
||||||
strokeWidth="2"
|
strokeMiterlimit="10"
|
||||||
d="M4 7h22M4 15h22M4 23h22"
|
strokeWidth="2"
|
||||||
/>
|
d="M4 7h22M4 15h22M4 23h22"
|
||||||
</svg>
|
/>
|
||||||
</div>
|
</svg>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<Link className="navbar__brand" to={logoLink} {...logoLinkProps}>
|
<Link className="navbar__brand" to={logoLink} {...logoLinkProps}>
|
||||||
{logoImageUrl != null && (
|
{logoImageUrl != null && (
|
||||||
<img
|
<img
|
||||||
|
|
Loading…
Add table
Reference in a new issue