Commit eba15666 authored by Lyza Danger Gardner's avatar Lyza Danger Gardner Committed by Lyza Gardner

Update shared components in `SidebarContentError`

parent 1f0fea18
import { LabeledButton, Panel } from '@hypothesis/frontend-shared';
import {
Button,
Panel,
RestrictedIcon,
} from '@hypothesis/frontend-shared/lib/next';
import { useSidebarStore } from '../store';
......@@ -41,21 +45,21 @@ export default function SidebarContentError({
return (
<div className="mb-4">
<Panel icon="restricted" title={errorTitle}>
<Panel icon={RestrictedIcon} title={errorTitle}>
<p>{errorMessage}</p>
<div className="flex justify-end space-x-2">
{showClearSelection && (
<LabeledButton
<Button
variant={isLoggedIn ? 'primary' : undefined}
onClick={() => store.clearSelection()}
>
Show all annotations
</LabeledButton>
</Button>
)}
{!isLoggedIn && (
<LabeledButton variant="primary" onClick={onLoginRequest}>
<Button variant="primary" onClick={onLoginRequest}>
Log in
</LabeledButton>
</Button>
)}
</div>
</Panel>
......
......@@ -36,7 +36,7 @@ describe('SidebarContentError', () => {
const findButtonByText = (wrapper, text) => {
return wrapper
.find('LabeledButton')
.find('button')
.filterWhere(button => button.text() === text)
.at(0);
};
......
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