Przeglądaj źródła

Merge pull request #5995 from overleaf/jk-navbar-menu-button

[web] Use real button for Menu button in navbar

GitOrigin-RevId: c1b85c366046774aa638801647cb61eba0de7098
June Kelly 4 lat temu
rodzic
commit
affe266609

+ 10 - 5
services/web/frontend/js/features/editor-navigation-toolbar/components/menu-button.js

@@ -6,11 +6,16 @@ function MenuButton({ onClick }) {
   const { t } = useTranslation()
   const { t } = useTranslation()
 
 
   return (
   return (
-    // eslint-disable-next-line jsx-a11y/anchor-is-valid
-    <a role="button" className="btn btn-full-height" href="#" onClick={onClick}>
-      <Icon type="fw" modifier="bars" classes={{ icon: 'editor-menu-icon' }} />
-      <p className="toolbar-label">{t('menu')}</p>
-    </a>
+    <div className="toolbar-item">
+      <button className="btn btn-full-height" onClick={onClick}>
+        <Icon
+          type="bars "
+          modifier="fw"
+          classes={{ icon: 'editor-menu-icon' }}
+        />
+        <p className="toolbar-label">{t('menu')}</p>
+      </button>
+    </div>
   )
   )
 }
 }
 
 

+ 2 - 1
services/web/frontend/stylesheets/app/editor/toolbar.less

@@ -20,7 +20,8 @@
     }
     }
   }
   }
 
 
-  .toolbar-right {
+  .toolbar-right,
+  .toolbar-left {
     button {
     button {
       background: transparent;
       background: transparent;
       box-shadow: none;
       box-shadow: none;