Move filter icon next to header text in all views

This commit is contained in:
Christian Vidal Wolf
2026-04-10 10:05:59 +02:00
parent 19df2d04e4
commit 4e6563d38d
3 changed files with 15 additions and 15 deletions
+6 -6
View File
@@ -228,24 +228,24 @@ export function ArticleDetails({ data, onEdit, rowStatuses }: ArticleDetailsProp
className="px-3 py-3 font-medium transition-colors select-none group relative border-r border-slate-700/30"
style={{ width: columnWidths[col] || 'auto', minWidth: columnWidths[col] || 'auto' }}
>
<div className="flex items-center gap-1 overflow-hidden">
<div className="flex items-center gap-1 cursor-pointer hover:text-white truncate" onClick={() => handleSort(col)}>
<div className="flex items-center overflow-hidden">
<span className="flex items-center gap-1 cursor-pointer hover:text-white truncate" onClick={() => handleSort(col)}>
{label}
{sortCol === col && (
sortDesc ? <ChevronDown className="w-3 h-3 shrink-0" /> : <ChevronUp className="w-3 h-3 shrink-0" />
sortDesc ? <ChevronDown className="w-3 h-3" /> : <ChevronUp className="w-3 h-3" />
)}
</div>
</span>
<button
onClick={(e) => {
e.stopPropagation();
setOpenFilterCol(openFilterCol === col ? null : col);
}}
className={cn(
"p-1 rounded hover:bg-slate-700 transition-colors shrink-0",
"p-0.5 rounded hover:bg-slate-700 transition-colors -my-1",
(columnFilters[col]?.length || 0) > 0 ? "text-indigo-400 bg-indigo-400/10" : "text-slate-500 opacity-0 group-hover:opacity-100"
)}
>
<Filter className="w-3.5 h-3.5" />
<Filter className="w-3 h-3" />
</button>
</div>