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>
|
||||
|
||||
{folder.notesCount !== undefined && folder.notesCount > 0 && (
|
||||
<span className="text-xs text-[var(--muted-foreground)]">
|
||||
{folder.notesCount}
|
||||
</span>
|
||||
)}
|
||||
|
||||
<div className="flex items-center justify-end gap-2 min-w-[2rem]">
|
||||
<div className="opacity-0 group-hover:opacity-100 transition-opacity flex items-center gap-1">
|
||||
<button
|
||||
onClick={handleEdit}
|
||||
@@ -167,6 +162,12 @@ function FolderItem({
|
||||
<Trash2 className="w-3 h-3" />
|
||||
</button>
|
||||
</div>
|
||||
{folder.notesCount !== undefined && folder.notesCount > 0 && (
|
||||
<span className="text-xs text-[var(--muted-foreground)]">
|
||||
{folder.notesCount}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{hasChildren && isExpanded && (
|
||||
|
||||
Reference in New Issue
Block a user