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
6d50b1b5
Commit
6d50b1b5
authored
Feb 25, 2022
by
Lyza Danger Gardner
Committed by
Lyza Gardner
Mar 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Transition `WarningBanner` to tailwind; update to shared components
parent
1c76a6d4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
26 deletions
+23
-26
WarningBanner.js
src/annotator/components/WarningBanner.js
+22
-15
WarningBanner.scss
src/styles/annotator/components/WarningBanner.scss
+0
-7
_index.scss
src/styles/annotator/components/_index.scss
+0
-4
tailwind.config.mjs
tailwind.config.mjs
+1
-0
No files found.
src/annotator/components/WarningBanner.js
View file @
6d50b1b5
import
{
SvgIcon
}
from
'@hypothesis/frontend-shared'
;
import
{
Icon
,
Link
}
from
'@hypothesis/frontend-shared'
;
import
classnames
from
'classnames'
;
/**
/**
* A banner shown at the top of the PDF viewer if the PDF cannot be annotated
* A banner shown at the top of the PDF viewer if the PDF cannot be annotated
...
@@ -6,20 +7,26 @@ import { SvgIcon } from '@hypothesis/frontend-shared';
...
@@ -6,20 +7,26 @@ import { SvgIcon } from '@hypothesis/frontend-shared';
*/
*/
export
default
function
WarningBanner
()
{
export
default
function
WarningBanner
()
{
return
(
return
(
<
div
className
=
"WarningBanner WarningBanner--notice"
>
<
div
className
=
"bg-white"
>
<
div
className
=
"WarningBanner__type"
>
<
div
<
SvgIcon
name
=
"caution"
className
=
"WarningBanner__icon"
/>
className
=
{
classnames
(
<
/div
>
'flex items-center gap-x-2'
,
<
div
className
=
"WarningBanner__message"
>
'border border-yellow-notice bg-yellow-notice/10 text-annotator-base'
<
strong
>
This
PDF
does
not
contain
selectable
text
:
<
/strong>{' '
}
)}
<
a
>
target
=
"_blank"
<
div
className
=
"bg-yellow-notice text-white p-2"
>
rel
=
"noreferrer"
<
Icon
name
=
"caution"
classes
=
"text-annotator-xl"
/>
href
=
"https://web.hypothes.is/help/how-to-ocr-optimize-pdfs/"
<
/div
>
>
<
div
>
Learn
how
to
fix
this
<
strong
>
This
PDF
does
not
contain
selectable
text
:
<
/strong>{' '
}
<
/a>{' '
}
<
Link
in
order
to
annotate
with
Hypothesis
.
target
=
"_blank"
href
=
"https://web.hypothes.is/help/how-to-ocr-optimize-pdfs/"
>
Learn
how
to
fix
this
<
/Link>{' '
}
in
order
to
annotate
with
Hypothesis
.
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
);
);
...
...
src/styles/annotator/components/WarningBanner.scss
deleted
100644 → 0
View file @
1c76a6d4
@use
'../mixins/molecules'
;
@use
'../variables'
as
var
;
.WarningBanner
{
@include
molecules
.
banner
;
font-size
:
var
.
$annotator-adder-font-size
;
}
src/styles/annotator/components/_index.scss
View file @
6d50b1b5
@use
'tailwindcss/components'
;
@use
'tailwindcss/components'
;
@use
'@hypothesis/frontend-shared/styles'
;
@use
'@hypothesis/frontend-shared/styles'
;
// Extensions and overrides to patterns from `frontend-shared`
@use
'../../frontend-shared'
;
// Annotator-specific components.
// Annotator-specific components.
@use
'./AdderToolbar'
;
@use
'./AdderToolbar'
;
@use
'./Buckets'
;
@use
'./Buckets'
;
@use
'./WarningBanner'
;
tailwind.config.mjs
View file @
6d50b1b5
...
@@ -52,6 +52,7 @@ export default {
...
@@ -52,6 +52,7 @@ export default {
// remain as pixels when sidebar converts to rems or otherwise be
// remain as pixels when sidebar converts to rems or otherwise be
// independent of sidebar font sizes
// independent of sidebar font sizes
'annotator-sm'
:
[
'12px'
],
'annotator-sm'
:
[
'12px'
],
'annotator-base'
:
[
'14px'
],
'annotator-lg'
:
[
'16px'
],
'annotator-lg'
:
[
'16px'
],
'annotator-xl'
:
[
'18px'
],
'annotator-xl'
:
[
'18px'
],
},
},
...
...
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