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
c052cd18
Commit
c052cd18
authored
Mar 11, 2022
by
Lyza Danger Gardner
Committed by
Robert Knight
Mar 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add JSTOR icon and style `ContentPartnerBanner`
parent
75694446
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
163 additions
and
4 deletions
+163
-4
ContentPartnerBanner.js
src/annotator/components/ContentPartnerBanner.js
+20
-3
icons.js
src/annotator/icons.js
+3
-1
jstor.svg
src/images/icons/jstor.svg
+140
-0
No files found.
src/annotator/components/ContentPartnerBanner.js
View file @
c052cd18
import
{
Icon
,
LabeledButton
,
Link
}
from
'@hypothesis/frontend-shared'
;
/**
* @typedef {import('../../types/annotator').ContentPartner} ContentPartner
*/
...
...
@@ -11,9 +13,24 @@
*/
export
default
function
ContentPartnerBanner
({
provider
,
onClose
})
{
return
(
<
div
className
=
"bg-white p-2"
>
{
provider
===
'jstor'
&&
'Content provided by JSTOR'
}
<
button
onClick
=
{
onClose
}
>
Close
<
/button
>
<
div
className
=
"flex items-center border-b gap-x-4 px-2 py-1 bg-white text-annotator-lg"
>
{
provider
===
'jstor'
&&
(
<>
<
Link
href
=
"https://jstor.org"
>
<
Icon
classes
=
"w-[97px] h-[25px]"
name
=
"jstor"
title
=
"Document hosted by JSTOR"
/>
<
/Link
>
<
div
className
=
"grow"
>
Document
hosted
by
<
b
>
JSTOR
<
/b
>
<
/div
>
<
/
>
)}
<
div
className
=
"text-annotator-base"
>
<
LabeledButton
onClick
=
{
onClose
}
>
Close
<
/LabeledButton
>
<
/div
>
<
/div
>
);
}
src/annotator/icons.js
View file @
c052cd18
...
...
@@ -14,10 +14,11 @@ import {
// Different variant than shared icon
import
annotateIcon
from
'../images/icons/annotate.svg'
;
// Not in shared icon set
import
jstor
from
'../images/icons/jstor.svg'
;
import
pointerIcon
from
'../images/icons/pointer.svg'
;
/**
* Set of icons used by the annotator part of the application via the `
Svg
Icon`
* Set of icons used by the annotator part of the application via the `Icon`
* component.
*/
export
const
annotatorIcons
=
{
...
...
@@ -28,6 +29,7 @@ export const annotatorIcons = {
'caret-right'
:
caretRight
,
hide
,
highlight
,
jstor
,
note
,
pointer
:
pointerIcon
,
show
,
...
...
src/images/icons/jstor.svg
0 → 100644
View file @
c052cd18
This diff is collapsed.
Click to expand it.
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