({
cellId,
sort: [sortCellId, sortDescending],
label = cellId ?? EMPTY_STRING,
onClick,
}: {
readonly cellId?: Id;
readonly sort: SortAndOffset | [];
readonly label?: string;
readonly onClick?: HandleSort;
})
| 41 | } from './index.tsx'; |
| 42 | |
| 43 | export 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 | ); |
| 72 | export const HtmlTable = ({ |
| 73 | className, |
| 74 | headerRow, |
nothing calls this directly
no test coverage detected
searching dependent graphs…