MCPcopy Create free account
hub / github.com/bewcloud/bewcloud / renderSortableHeader

Function renderSortableHeader

public/components/files/ListFiles.js:57–75  ·  view source on GitHub ↗
(label, column, extraClassName)

Source from the content-addressed store, hash-verified

55 }
56 }
57 function renderSortableHeader(label, column, extraClassName) {
58 const isActive = sortBy === column;
59 if (!onClickSort) {
60 return h("th", {
61 scope: "col",
62 class: `px-6 py-4 font-medium text-white ${extraClassName || ''}`
63 }, label);
64 }
65 return h("th", {
66 scope: "col",
67 class: `px-6 py-4 font-medium text-white ${extraClassName || ''}`
68 }, h("button", {
69 class: `group flex items-center justify-between w-full text-left hover:text-blue-300 ${isActive ? 'text-blue-400' : ''}`,
70 onClick: () => onClickSort(column),
71 type: "button"
72 }, h("span", null, label), h("span", {
73 class: "ml-1"
74 }, renderSortIcon(column))));
75 }
76 let routePath = fileShareId ? `file-share/${fileShareId}` : 'files';
77 let itemSingleLabel = 'file';
78 let itemPluralLabel = 'files';

Callers 1

ListFilesFunction · 0.70

Calls 3

onClickSortFunction · 0.70
renderSortIconFunction · 0.70
hFunction · 0.50

Tested by

no test coverage detected