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

Convert NotebookResultCount to tailwind

parent cea371d8
...@@ -38,26 +38,28 @@ function NotebookResultCount({ ...@@ -38,26 +38,28 @@ function NotebookResultCount({
const threadCount = rootThread.children.length; const threadCount = rootThread.children.length;
return ( return (
<div className="hyp-u-layout-row NotebookResultCount"> <div className="flex gap-x-1 leading-none">
{isLoading && <Spinner size="small" />} {isLoading && <Spinner size="small" />}
{!isLoading && ( {!isLoading && (
<h2> <h2 className="font-bold">
{!hasResults && <strong>No results</strong>} {!hasResults && <span>No results</span>}
{hasResults && isFiltered && ( {hasResults && isFiltered && (
<strong> <span>
{matchCount} {matchCount === 1 ? 'result' : 'results'} {matchCount} {matchCount === 1 ? 'result' : 'results'}
</strong> </span>
)} )}
{hasResults && !isFiltered && ( {hasResults && !isFiltered && (
<strong> <span>
{threadCount} {threadCount === 1 ? 'thread' : 'threads'} {threadCount} {threadCount === 1 ? 'thread' : 'threads'}
</strong> </span>
)} )}
</h2> </h2>
)} )}
{hasForcedVisible && <h3>(and {forcedVisibleCount} more)</h3>} {hasForcedVisible && (
<h3 className="italic font-normal">(and {forcedVisibleCount} more)</h3>
)}
{!isFiltered && hasResults && ( {!isFiltered && hasResults && (
<h3> <h3 className="italic font-normal">
({visibleCount} {visibleCount === 1 ? 'annotation' : 'annotations'}) ({visibleCount} {visibleCount === 1 ? 'annotation' : 'annotations'})
</h3> </h3>
)} )}
......
@use '../../variables' as var;
@use '../../mixins/layout';
.NotebookResultCount {
@include layout.horizontal-rhythm;
// Normalize line height to ensure vertical stability (no jumping around)
line-height: 1;
& h2 {
strong {
font-weight: bold;
font-style: normal;
}
}
& h3 {
font-style: italic;
}
}
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
@use './Menu'; @use './Menu';
@use './MenuItem'; @use './MenuItem';
@use './MenuSection'; @use './MenuSection';
@use './NotebookResultCount';
@use './PaginationNavigation'; @use './PaginationNavigation';
@use './StyledText'; @use './StyledText';
......
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