Commit 4c3b5e13 authored by Lyza Danger Gardner's avatar Lyza Danger Gardner Committed by Lyza Gardner

Use `LinkButton` instead of `Button`

parent 6ef66155
...@@ -13,7 +13,7 @@ import { ...@@ -13,7 +13,7 @@ import {
import { annotationDisplayName } from '../../helpers/annotation-user'; import { annotationDisplayName } from '../../helpers/annotation-user';
import { isPrivate } from '../../helpers/permissions'; import { isPrivate } from '../../helpers/permissions';
import Button from '../Button'; import { LinkButton } from '../../../shared/components/buttons';
import AnnotationDocumentInfo from './AnnotationDocumentInfo'; import AnnotationDocumentInfo from './AnnotationDocumentInfo';
import AnnotationShareInfo from './AnnotationShareInfo'; import AnnotationShareInfo from './AnnotationShareInfo';
...@@ -133,12 +133,9 @@ function AnnotationHeader({ ...@@ -133,12 +133,9 @@ function AnnotationHeader({
displayName={authorDisplayName} displayName={authorDisplayName}
/> />
{showReplyButton && ( {showReplyButton && (
<Button <LinkButton onClick={onReplyCountClick} title="Expand replies">
className="AnnotationHeader__reply-toggle" {replyButtonText}
buttonText={replyButtonText} </LinkButton>
onClick={onReplyCountClick}
title="Expand replies"
/>
)} )}
{showTimestamps && ( {showTimestamps && (
......
...@@ -149,7 +149,7 @@ describe('AnnotationHeader', () => { ...@@ -149,7 +149,7 @@ describe('AnnotationHeader', () => {
describe('expand replies toggle button', () => { describe('expand replies toggle button', () => {
const findReplyButton = wrapper => const findReplyButton = wrapper =>
wrapper.find('Button').filter('.AnnotationHeader__reply-toggle'); wrapper.find('LinkButton[title="Expand replies"]');
it('should render if annotation is a collapsed reply and there are replies to show', () => { it('should render if annotation is a collapsed reply and there are replies to show', () => {
fakeIsReply.returns(true); fakeIsReply.returns(true);
...@@ -223,7 +223,7 @@ describe('AnnotationHeader', () => { ...@@ -223,7 +223,7 @@ describe('AnnotationHeader', () => {
threadIsCollapsed: true, threadIsCollapsed: true,
}); });
const replyCollapseButton = findReplyButton(wrapper); const replyCollapseButton = findReplyButton(wrapper);
assert.equal(replyCollapseButton.props().buttonText, testCase.expected); assert.equal(replyCollapseButton.props().children, testCase.expected);
}); });
}); });
}); });
......
...@@ -2,7 +2,7 @@ import { SvgIcon } from '@hypothesis/frontend-shared'; ...@@ -2,7 +2,7 @@ import { SvgIcon } from '@hypothesis/frontend-shared';
import { withServices } from '../service-context'; import { withServices } from '../service-context';
import Button from './Button'; import { LinkButton } from '../../shared/components/buttons';
/** @typedef {import('../services/service-url').ServiceUrlGetter} ServiceUrlGetter */ /** @typedef {import('../services/service-url').ServiceUrlGetter} ServiceUrlGetter */
...@@ -34,11 +34,13 @@ function LoggedOutMessage({ onLogin, serviceUrl }) { ...@@ -34,11 +34,13 @@ function LoggedOutMessage({ onLogin, serviceUrl }) {
create a free account create a free account
</a>{' '} </a>{' '}
or{' '} or{' '}
<Button <LinkButton
className="LoggedOutMessage__link" className="InlineLinkButton"
onClick={onLogin} onClick={onLogin}
buttonText="log in" variant="dark"
/> >
log in
</LinkButton>
. .
</span> </span>
<div className="LoggedOutMessage__logo"> <div className="LoggedOutMessage__logo">
......
...@@ -39,7 +39,7 @@ describe('LoggedOutMessage', () => { ...@@ -39,7 +39,7 @@ describe('LoggedOutMessage', () => {
const fakeOnLogin = sinon.stub(); const fakeOnLogin = sinon.stub();
const wrapper = createLoggedOutMessage({ onLogin: fakeOnLogin }); const wrapper = createLoggedOutMessage({ onLogin: fakeOnLogin });
const loginLink = wrapper.find('.LoggedOutMessage__link').at(1); const loginLink = wrapper.find('LinkButton');
assert.equal(loginLink.prop('onClick'), fakeOnLogin); assert.equal(loginLink.prop('onClick'), fakeOnLogin);
}); });
......
...@@ -16,11 +16,6 @@ ...@@ -16,11 +16,6 @@
color: var.$color-text; color: var.$color-text;
} }
&__reply-toggle {
@include buttons.button--link;
padding: 0 var.$layout-space--xsmall;
}
// Timestamps are right aligned in a flex row // Timestamps are right aligned in a flex row
&__timestamps { &__timestamps {
flex-grow: 1; flex-grow: 1;
......
...@@ -11,11 +11,13 @@ ...@@ -11,11 +11,13 @@
} }
.LoggedOutMessage__link { .LoggedOutMessage__link {
@include buttons.button--link;
padding: 0; padding: 0;
display: inline; display: inline;
color: var.$color-text; color: var.$color-text;
text-decoration: underline; text-decoration: underline;
&:hover {
text-decoration: underline;
}
} }
.LoggedOutMessage__logo { .LoggedOutMessage__logo {
......
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