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
0a82f13c
Commit
0a82f13c
authored
Apr 06, 2022
by
Lyza Danger Gardner
Committed by
Lyza Gardner
Apr 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Transition LoggedOutMessage to Tailwind
parent
d80d8e98
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
44 deletions
+13
-44
LoggedOutMessage.js
src/sidebar/components/LoggedOutMessage.js
+12
-16
LoggedOutMessage-test.js
src/sidebar/components/test/LoggedOutMessage-test.js
+1
-1
LoggedOutMessage.scss
src/styles/sidebar/components/LoggedOutMessage.scss
+0
-26
_index.scss
src/styles/sidebar/components/_index.scss
+0
-1
No files found.
src/sidebar/components/LoggedOutMessage.js
View file @
0a82f13c
import
{
LinkButton
,
Icon
}
from
'@hypothesis/frontend-shared'
;
import
{
Link
,
Link
Button
,
Icon
}
from
'@hypothesis/frontend-shared'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
import
{
useStoreProxy
}
from
'../store/use-store'
;
...
@@ -18,36 +18,32 @@ function LoggedOutMessage({ onLogin }) {
...
@@ -18,36 +18,32 @@ function LoggedOutMessage({ onLogin }) {
const
store
=
useStoreProxy
();
const
store
=
useStoreProxy
();
return
(
return
(
<
div
className
=
"
LoggedOutMessage
"
>
<
div
className
=
"
flex flex-col items-center m-6 space-y-6
"
>
<
span
>
<
span
className
=
"text-center"
>
This
is
a
public
annotation
created
with
Hypothesis
.
<
br
/>
This
is
a
public
annotation
created
with
Hypothesis
.
<
br
/>
To
reply
or
make
your
own
annotations
on
this
document
,{
' '
}
To
reply
or
make
your
own
annotations
on
this
document
,{
' '
}
<
a
<
Link
class
Name
=
"LoggedOutMessage__link
"
class
es
=
"inline text-color-text underline hover:underline
"
href
=
{
store
.
getLink
(
'signup'
)}
href
=
{
store
.
getLink
(
'signup'
)}
target
=
"_blank"
target
=
"_blank"
rel
=
"noopener noreferrer"
>
>
create
a
free
account
create
a
free
account
<
/
a
>{' '
}
<
/
Link
>{' '
}
or
{
' '
}
or
{
' '
}
<
LinkButton
<
LinkButton
classes
=
"inline underline"
onClick
=
{
onLogin
}
variant
=
"dark"
>
classes
=
"InlineLinkButton InlineLinkButton--underlined"
onClick
=
{
onLogin
}
variant
=
"dark"
>
log
in
log
in
<
/LinkButton
>
<
/LinkButton
>
.
.
<
/span
>
<
/span
>
<
div
className
=
"LoggedOutMessage__logo"
>
<
div
>
<
a
<
Link
href
=
"https://hypothes.is"
href
=
"https://hypothes.is"
aria
-
label
=
"Hypothesis homepage"
aria
-
label
=
"Hypothesis homepage"
target
=
"_blank"
title
=
"Hypothesis homepage"
title
=
"Hypothesis homepage"
>
>
<
Icon
name
=
"logo"
classes
=
"w-16 h-16
hyp-u-color-
-grey-7"
/>
<
Icon
name
=
"logo"
classes
=
"w-16 h-16
text
-grey-7"
/>
<
/
a
>
<
/
Link
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
);
);
...
...
src/sidebar/components/test/LoggedOutMessage-test.js
View file @
0a82f13c
...
@@ -30,7 +30,7 @@ describe('LoggedOutMessage', () => {
...
@@ -30,7 +30,7 @@ describe('LoggedOutMessage', () => {
it
(
'should link to signup'
,
()
=>
{
it
(
'should link to signup'
,
()
=>
{
const
wrapper
=
createLoggedOutMessage
();
const
wrapper
=
createLoggedOutMessage
();
const
signupLink
=
wrapper
.
find
(
'
.LoggedOutMessage__l
ink'
).
at
(
0
);
const
signupLink
=
wrapper
.
find
(
'
L
ink'
).
at
(
0
);
assert
.
calledWith
(
fakeStore
.
getLink
,
'signup'
);
assert
.
calledWith
(
fakeStore
.
getLink
,
'signup'
);
assert
.
equal
(
signupLink
.
prop
(
'href'
),
'signup_link'
);
assert
.
equal
(
signupLink
.
prop
(
'href'
),
'signup_link'
);
...
...
src/styles/sidebar/components/LoggedOutMessage.scss
deleted
100644 → 0
View file @
d80d8e98
@use
'../../mixins/buttons'
;
@use
'../../mixins/layout'
;
@use
'../../variables'
as
var
;
.LoggedOutMessage
{
@include
layout
.
column
;
margin
:
25px
auto
;
width
:
70%
;
text-align
:
center
;
color
:
var
.
$color-text
;
}
.LoggedOutMessage__link
{
padding
:
0
;
display
:
inline
;
color
:
var
.
$color-text
;
text-decoration
:
underline
;
&
:hover
{
text-decoration
:
underline
;
}
}
.LoggedOutMessage__logo
{
@include
layout
.
row
(
center
);
margin-top
:
25px
;
}
src/styles/sidebar/components/_index.scss
View file @
0a82f13c
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
@use
'./GroupListItem'
;
@use
'./GroupListItem'
;
@use
'./HypothesisApp'
;
@use
'./HypothesisApp'
;
@use
'./LaunchErrorPanel'
;
@use
'./LaunchErrorPanel'
;
@use
'./LoggedOutMessage'
;
@use
'./Menu'
;
@use
'./Menu'
;
@use
'./MenuItem'
;
@use
'./MenuItem'
;
@use
'./MenuSection'
;
@use
'./MenuSection'
;
...
...
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