Commit 42b5e11e authored by Lyza Danger Gardner's avatar Lyza Danger Gardner Committed by Lyza Gardner

Convert several simpler sidebar components to Tailwind

- Convert `LaunchErrorPanel`
- Convert `SidebarContentError`
- Convert `SortMenu`
parent ae653cd8
import { Panel } from '@hypothesis/frontend-shared'; import { Panel } from '@hypothesis/frontend-shared';
import classnames from 'classnames';
/** /**
* @typedef LaunchErrorPanelProps * @typedef LaunchErrorPanelProps
...@@ -15,7 +16,13 @@ import { Panel } from '@hypothesis/frontend-shared'; ...@@ -15,7 +16,13 @@ import { Panel } from '@hypothesis/frontend-shared';
*/ */
export default function LaunchErrorPanel({ error }) { export default function LaunchErrorPanel({ error }) {
return ( return (
<div className="LaunchErrorPanel"> <div
className={classnames(
// The large top-margin is to ensure the panel clears the close button
// in the Notebook
'm-2 mt-12'
)}
>
<Panel title="Unable to start Hypothesis">{error.message}</Panel> <Panel title="Unable to start Hypothesis">{error.message}</Panel>
</div> </div>
); );
......
...@@ -43,7 +43,7 @@ export default function SidebarContentError({ ...@@ -43,7 +43,7 @@ export default function SidebarContentError({
<div className="mb-4"> <div className="mb-4">
<Panel icon="restricted" title={errorTitle}> <Panel icon="restricted" title={errorTitle}>
<p>{errorMessage}</p> <p>{errorMessage}</p>
<div className="hyp-u-layout-row--justify-right hyp-u-horizontal-spacing"> <div className="flex justify-end space-x-2">
{showClearSelection && ( {showClearSelection && (
<LabeledButton <LabeledButton
variant={isLoggedIn ? 'primary' : undefined} variant={isLoggedIn ? 'primary' : undefined}
......
.LaunchErrorPanel {
// Top margin ensures that the error notice appears below the Notebook's
// "Close" button.
margin: 0.5rem;
margin-top: 3rem;
}
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
@use './FilterSelect'; @use './FilterSelect';
@use './GroupList'; @use './GroupList';
@use './GroupListItem'; @use './GroupListItem';
@use './LaunchErrorPanel';
@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