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

Function HtmlHeaderCell

src/ui-solid-dom/common/components.tsx:45–71  ·  view source on GitHub ↗
(props: {
  readonly cellId?: Id;
  readonly sort: SortAndOffset | [];
  readonly label?: string;
  readonly onClick?: HandleSort;
})

Source from the content-addressed store, hash-verified

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

Callers 1

contentFunction · 0.70

Calls 2

getCallbackOrUndefinedFunction · 0.90
isUndefinedFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…