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
0c57610a
Commit
0c57610a
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 `ToastMessages`
parent
d8f4060c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
ToastMessages.js
src/sidebar/components/ToastMessages.js
+2
-2
ToastMessages-test.js
src/sidebar/components/test/ToastMessages-test.js
+1
-1
No files found.
src/sidebar/components/ToastMessages.js
View file @
0c57610a
import
classnames
from
'classnames'
;
import
classnames
from
'classnames'
;
import
{
Svg
Icon
}
from
'@hypothesis/frontend-shared'
;
import
{
Icon
}
from
'@hypothesis/frontend-shared'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
import
{
withServices
}
from
'../service-context'
;
import
{
withServices
}
from
'../service-context'
;
...
@@ -49,7 +49,7 @@ function ToastMessage({ message, onDismiss }) {
...
@@ -49,7 +49,7 @@ function ToastMessage({ message, onDismiss }) {
)}
)}
>
>
<
div
className
=
"toast-message__type"
>
<
div
className
=
"toast-message__type"
>
<
SvgIcon
name
=
{
iconName
}
className
=
"toast-message__icon"
/>
<
Icon
name
=
{
iconName
}
classes
=
"toast-message__icon"
/>
<
/div
>
<
/div
>
<
div
className
=
"toast-message__message"
>
<
div
className
=
"toast-message__message"
>
<
strong
>
{
prefix
}:
<
/strong
>
<
strong
>
{
prefix
}:
<
/strong
>
...
...
src/sidebar/components/test/ToastMessages-test.js
View file @
0c57610a
...
@@ -166,7 +166,7 @@ describe('ToastMessages', () => {
...
@@ -166,7 +166,7 @@ describe('ToastMessages', () => {
const
wrapper
=
createComponent
();
const
wrapper
=
createComponent
();
const
iconProps
=
wrapper
const
iconProps
=
wrapper
.
find
(
'
Svg
Icon'
)
.
find
(
'Icon'
)
.
map
(
iconWrapper
=>
iconWrapper
.
props
().
name
);
.
map
(
iconWrapper
=>
iconWrapper
.
props
().
name
);
assert
.
deepEqual
(
iconProps
,
testCase
.
icons
);
assert
.
deepEqual
(
iconProps
,
testCase
.
icons
);
...
...
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