diff --git a/components/files/ListFiles.tsx b/components/files/ListFiles.tsx index e057e4f..7a960db 100644 --- a/components/files/ListFiles.tsx +++ b/components/files/ListFiles.tsx @@ -63,9 +63,33 @@ export default function ListFiles( const dateFormat = new Intl.DateTimeFormat('en-GB', dateFormatOptions); - function getSortIcon(column: SortColumn): string | null { - if (sortBy !== column) return '↕'; // neutral sort icon - return sortOrder === 'asc' ? '↑' : '↓'; + function renderSortIcon(column: SortColumn): ComponentChildren { + const isActive = sortBy === column; + + if (isActive) { + // Show active sort icon with rotation + const rotation = sortOrder === 'asc' ? '' : 'rotate-180'; + return ( + {`Sort + ); + } else { + // Show neutral sort icon only on hover + return ( + Sort + ); + } } function renderSortableHeader( @@ -74,7 +98,6 @@ export default function ListFiles( className?: string, ): ComponentChildren { const isActive = sortBy === column; - const iconClass = isActive ? 'text-blue-400' : 'text-slate-400'; if (!onClickSort) { return {label}; @@ -83,15 +106,15 @@ export default function ListFiles( return ( diff --git a/static/images/sort-none.svg b/static/images/sort-none.svg new file mode 100644 index 0000000..fac4d4a --- /dev/null +++ b/static/images/sort-none.svg @@ -0,0 +1,14 @@ + + + diff --git a/static/images/sort-up.svg b/static/images/sort-up.svg new file mode 100644 index 0000000..4acc6dc --- /dev/null +++ b/static/images/sort-up.svg @@ -0,0 +1,10 @@ + + +