(props: TableHeaderProps<T>)
| 93 | } |
| 94 | |
| 95 | export function TableHeader<T>(props: TableHeaderProps<T>) { |
| 96 | let {selectionBehavior, selectionMode, allowsDragging} = useTableOptions(); |
| 97 | |
| 98 | return ( |
| 99 | <AriaTableHeader |
| 100 | {...props} |
| 101 | className={composeTailwindRenderProps( |
| 102 | props.className, |
| 103 | 'sticky top-0 z-10 bg-neutral-100/60 dark:bg-neutral-700/60 backdrop-blur-md supports-[-moz-appearance:none]:bg-neutral-100 dark:supports-[-moz-appearance:none]:bg-neutral-700 forced-colors:bg-[Canvas] rounded-t-lg border-b border-b-neutral-200 dark:border-b-neutral-700' |
| 104 | )}> |
| 105 | {/* Add extra columns for drag and drop and selection. */} |
| 106 | {allowsDragging && <Column />} |
| 107 | {selectionBehavior === 'toggle' && ( |
| 108 | <AriaColumn |
| 109 | width={36} |
| 110 | minWidth={36} |
| 111 | className="box-border p-2 text-sm font-semibold cursor-default text-start"> |
| 112 | {selectionMode === 'multiple' && <Checkbox slot="selection" />} |
| 113 | </AriaColumn> |
| 114 | )} |
| 115 | <Collection items={props.columns}>{props.children}</Collection> |
| 116 | </AriaTableHeader> |
| 117 | ); |
| 118 | } |
| 119 | |
| 120 | export function TableBody<T>(props: TableBodyProps<T>) { |
| 121 | return <AriaTableBody {...props} className="empty:italic empty:text-center empty:text-sm" />; |
nothing calls this directly
no test coverage detected