MCPcopy Index your code
hub / github.com/tinyplex/tinybase / HtmlHeaderCell

Function HtmlHeaderCell

src/ui-react-dom/common/components.tsx:43–71  ·  view source on GitHub ↗
({
  cellId,
  sort: [sortCellId, sortDescending],
  label = cellId ?? EMPTY_STRING,
  onClick,
}: {
  readonly cellId?: Id;
  readonly sort: SortAndOffset | [];
  readonly label?: string;
  readonly onClick?: HandleSort;
})

Source from the content-addressed store, hash-verified

41} from './index.tsx';
42
43export const HtmlHeaderCell = ({
44 cellId,
45 sort: [sortCellId, sortDescending],
46 label = cellId ?? EMPTY_STRING,
47 onClick,
48}: {
49 readonly cellId?: Id;
50 readonly sort: SortAndOffset | [];
51 readonly label?: string;
52 readonly onClick?: HandleSort;
53}) => (
54 <th
55 onClick={useCallbackOrUndefined(
56 () => onClick?.(cellId),
57 [onClick, cellId],
58 onClick,
59 )}
60 className={
61 isUndefined(sortDescending) || sortCellId != cellId
62 ? undefined
63 : `sorted ${sortDescending ? 'de' : 'a'}scending`
64 }
65 >
66 {isUndefined(sortDescending) || sortCellId != cellId
67 ? null
68 : (sortDescending ? DOWN_ARROW : UP_ARROW) + ' '}
69 {label}
70 </th>
71);
72export const HtmlTable = ({
73 className,
74 headerRow,

Callers

nothing calls this directly

Calls 3

useCallbackOrUndefinedFunction · 0.90
isUndefinedFunction · 0.90
onClickFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…