refactor(FoldersSidebar): reorganize button and notes count display for improved layout and accessibility
This commit is contained in:
@@ -145,12 +145,7 @@ function FolderItem({
|
|||||||
})()}
|
})()}
|
||||||
<span className="flex-1 text-sm truncate">{folder.name}</span>
|
<span className="flex-1 text-sm truncate">{folder.name}</span>
|
||||||
|
|
||||||
{folder.notesCount !== undefined && folder.notesCount > 0 && (
|
<div className="flex items-center justify-end gap-2 min-w-[2rem]">
|
||||||
<span className="text-xs text-[var(--muted-foreground)]">
|
|
||||||
{folder.notesCount}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<div className="opacity-0 group-hover:opacity-100 transition-opacity flex items-center gap-1">
|
<div className="opacity-0 group-hover:opacity-100 transition-opacity flex items-center gap-1">
|
||||||
<button
|
<button
|
||||||
onClick={handleEdit}
|
onClick={handleEdit}
|
||||||
@@ -167,6 +162,12 @@ function FolderItem({
|
|||||||
<Trash2 className="w-3 h-3" />
|
<Trash2 className="w-3 h-3" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
{folder.notesCount !== undefined && folder.notesCount > 0 && (
|
||||||
|
<span className="text-xs text-[var(--muted-foreground)]">
|
||||||
|
{folder.notesCount}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{hasChildren && isExpanded && (
|
{hasChildren && isExpanded && (
|
||||||
|
|||||||
Reference in New Issue
Block a user