Commit 0a82f13c authored by Lyza Danger Gardner's avatar Lyza Danger Gardner Committed by Lyza Gardner

Transition LoggedOutMessage to Tailwind

parent d80d8e98
import { LinkButton, Icon } from '@hypothesis/frontend-shared'; import { Link, LinkButton, 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
className="LoggedOutMessage__link" classes="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>
); );
......
...@@ -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__link').at(0); const signupLink = wrapper.find('Link').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');
......
@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;
}
...@@ -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';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment