Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
bf75c147
Unverified
Commit
bf75c147
authored
Apr 22, 2020
by
Lyza Gardner
Committed by
GitHub
Apr 22, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2072 from hypothesis/fix-nested-buttons
Do not use `button` element in `Menu` label
parents
9495bba6
481fe703
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
15 deletions
+14
-15
sort-menu.js
src/sidebar/components/sort-menu.js
+4
-7
user-menu.js
src/sidebar/components/user-menu.js
+4
-7
top-bar.scss
src/styles/sidebar/components/top-bar.scss
+6
-1
No files found.
src/sidebar/components/sort-menu.js
View file @
bf75c147
...
...
@@ -2,9 +2,9 @@ import { createElement } from 'preact';
import
useStore
from
'../store/use-store'
;
import
Button
from
'./button'
;
import
Menu
from
'./menu'
;
import
MenuItem
from
'./menu-item'
;
import
SvgIcon
from
'../../shared/components/svg-icon'
;
/**
* A drop-down menu of sorting options for a collection of annotations.
...
...
@@ -35,12 +35,9 @@ export default function SortMenu() {
});
const
menuLabel
=
(
<
Button
className
=
"top-bar__icon-button"
icon
=
"sort"
title
=
"Sort annotations"
useCompactStyle
/>
<
span
className
=
"top-bar__menu-label"
>
<
SvgIcon
name
=
"sort"
className
=
"top-bar__menu-icon"
/>
<
/span
>
);
return
(
...
...
src/sidebar/components/user-menu.js
View file @
bf75c147
...
...
@@ -6,10 +6,10 @@ import serviceConfig from '../service-config';
import
{
isThirdPartyUser
}
from
'../util/account-id'
;
import
{
withServices
}
from
'../util/service-context'
;
import
Button
from
'./button'
;
import
Menu
from
'./menu'
;
import
MenuItem
from
'./menu-item'
;
import
MenuSection
from
'./menu-section'
;
import
SvgIcon
from
'../../shared/components/svg-icon'
;
/**
* A menu with user and account links.
...
...
@@ -44,12 +44,9 @@ function UserMenu({ auth, bridge, onLogout, serviceUrl, settings }) {
})();
const
menuLabel
=
(
<
Button
className
=
"top-bar__icon-button"
icon
=
"profile"
title
=
"User menu"
useCompactStyle
/>
<
span
className
=
"top-bar__menu-label"
>
<
SvgIcon
name
=
"profile"
className
=
"top-bar__menu-icon"
/>
<
/span
>
);
return
(
<
div
className
=
"user-menu"
>
...
...
src/styles/sidebar/components/top-bar.scss
View file @
bf75c147
...
...
@@ -17,7 +17,8 @@
// the window is scrolled.
transform
:
translate3d
(
0
,
0
,
0
);
&
__icon-button
{
&
__icon-button
,
&
__menu-icon
{
&
.is-active
{
color
:
var
.
$grey-6
;
...
...
@@ -34,6 +35,10 @@
color
:
var
.
$brand
;
}
}
&
__menu-label
{
padding
:
0
.25em
;
}
}
.top-bar--theme-clean
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment