({
item,
children,
state,
className
}: {
item: any;
children: ReactNode;
state: any;
className: string;
})
| 303 | } |
| 304 | |
| 305 | export function TableRow({ |
| 306 | item, |
| 307 | children, |
| 308 | state, |
| 309 | className |
| 310 | }: { |
| 311 | item: any; |
| 312 | children: ReactNode; |
| 313 | state: any; |
| 314 | className: string; |
| 315 | }): JSX.Element { |
| 316 | let ref = useRef<HTMLTableRowElement | null>(null); |
| 317 | let isSelected = state.selectionManager.isSelected(item.key); |
| 318 | let {rowProps} = useTableRow({node: item}, state, ref); |
| 319 | let {isFocusVisible, focusProps} = useFocusRing(); |
| 320 | |
| 321 | return ( |
| 322 | <tr |
| 323 | style={{ |
| 324 | color: isSelected ? 'white' : undefined, |
| 325 | outline: isFocusVisible ? '2px solid orange' : 'none' |
| 326 | }} |
| 327 | className={className} |
| 328 | {...mergeProps(rowProps, focusProps)} |
| 329 | ref={ref}> |
| 330 | {children} |
| 331 | </tr> |
| 332 | ); |
| 333 | } |
| 334 | |
| 335 | export function TableCell({ |
| 336 | cell, |
nothing calls this directly
no test coverage detected