Refine sidebar collapse behavior

This commit is contained in:
Sam Becker 2025-03-23 18:20:20 -05:00
parent 896af10ba9
commit a834e07abf
2 changed files with 12 additions and 3 deletions

View File

@ -69,11 +69,20 @@ export default function HeaderList({
'text-xs font-medium tracking-wider',
'border-medium rounded-md',
'px-[5px] h-5!',
'hover:bg-dim active:bg-main',
'hover:bg-dim hover:text-main active:bg-main',
'group',
)}
>
{<span className="flex items-center gap-1">
<span>{isExpanded ? 'LESS' : 'MORE'}</span>
{isExpanded
? 'LESS'
: <>
MORE
<span className="hidden group-hover:inline text-dim!">
{' '}
{items.length - maxItems}
</span>
</>}
{isExpanded
? <IoChevronUpOutline size={12} />
: <IoChevronDownOutline size={12} />}

View File

@ -30,7 +30,7 @@ import {
} from '@/category';
import PhotoFocalLength from '@/focal/PhotoFocalLength';
const SIDEBAR_ITEM_MAX_COUNT = 24;
const SIDEBAR_ITEM_MAX_COUNT = 28;
export default function PhotoGridSidebar({
photosCount,