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
4349f633
Commit
4349f633
authored
Nov 02, 2021
by
Lyza Danger Gardner
Committed by
Lyza Gardner
Nov 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use `Icon` in `FilterSelect`
parent
9afd3943
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
8 deletions
+9
-8
FilterSelect.js
src/sidebar/components/FilterSelect.js
+4
-2
FilterSelect-test.js
src/sidebar/components/test/FilterSelect-test.js
+1
-1
FilterSelect.scss
src/styles/sidebar/components/FilterSelect.scss
+0
-5
util.scss
src/styles/util.scss
+4
-0
No files found.
src/sidebar/components/FilterSelect.js
View file @
4349f633
import
{
Svg
Icon
}
from
'@hypothesis/frontend-shared'
;
import
{
Icon
}
from
'@hypothesis/frontend-shared'
;
import
Menu
from
'./Menu'
;
import
Menu
from
'./Menu'
;
import
MenuItem
from
'./MenuItem'
;
import
MenuItem
from
'./MenuItem'
;
...
@@ -36,7 +36,9 @@ function FilterSelect({
...
@@ -36,7 +36,9 @@ function FilterSelect({
const
menuLabel
=
(
const
menuLabel
=
(
<
span
className
=
"FilterSelect__menu-label"
>
<
span
className
=
"FilterSelect__menu-label"
>
{
icon
&&
<
SvgIcon
name
=
{
icon
}
className
=
"FilterSelect__menu-icon"
/>
}
{
icon
&&
(
<
Icon
name
=
{
icon
}
classes
=
"u-icon--medium hyp-u-margin--right--3"
/>
)}
{
selected
.
display
}
{
selected
.
display
}
<
/span
>
<
/span
>
);
);
...
...
src/sidebar/components/test/FilterSelect-test.js
View file @
4349f633
...
@@ -65,7 +65,7 @@ describe('FilterSelect', () => {
...
@@ -65,7 +65,7 @@ describe('FilterSelect', () => {
const
wrapper
=
createComponent
({
icon
:
'profile'
});
const
wrapper
=
createComponent
({
icon
:
'profile'
});
const
label
=
mount
(
wrapper
.
find
(
'Menu'
).
props
().
label
);
const
label
=
mount
(
wrapper
.
find
(
'Menu'
).
props
().
label
);
const
icon
=
label
.
find
(
'
Svg
Icon'
);
const
icon
=
label
.
find
(
'Icon'
);
assert
.
isTrue
(
icon
.
exists
());
assert
.
isTrue
(
icon
.
exists
());
assert
.
equal
(
icon
.
props
().
name
,
'profile'
);
assert
.
equal
(
icon
.
props
().
name
,
'profile'
);
...
...
src/styles/sidebar/components/FilterSelect.scss
View file @
4349f633
...
@@ -24,9 +24,4 @@
...
@@ -24,9 +24,4 @@
flex-shrink
:
0
;
flex-shrink
:
0
;
font-weight
:
bold
;
font-weight
:
bold
;
}
}
&
__menu-icon
{
@include
utils
.
icon--medium
;
margin-right
:
var
.
$layout-space--xsmall
;
}
}
}
src/styles/util.scss
View file @
4349f633
...
@@ -49,6 +49,10 @@
...
@@ -49,6 +49,10 @@
@include
utils
.
icon--small
;
@include
utils
.
icon--small
;
}
}
.u-icon--medium
{
@include
utils
.
icon--medium
;
}
.u-icon--large
{
.u-icon--large
{
@include
utils
.
icon--large
;
@include
utils
.
icon--large
;
}
}
...
...
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