({children, ...props}: GridListItemProps)
| 56 | }); |
| 57 | |
| 58 | export function GridListItem({children, ...props}: GridListItemProps) { |
| 59 | let textValue = typeof children === 'string' ? children : undefined; |
| 60 | return ( |
| 61 | <AriaGridListItem textValue={textValue} {...props} className={itemStyles}> |
| 62 | {composeRenderProps( |
| 63 | children, |
| 64 | (children, {selectionMode, selectionBehavior, allowsDragging}) => ( |
| 65 | <> |
| 66 | {/* Add elements for drag and drop and selection. */} |
| 67 | {allowsDragging && <Button slot="drag">≡</Button>} |
| 68 | {selectionMode !== 'none' && selectionBehavior === 'toggle' && ( |
| 69 | <Checkbox slot="selection" /> |
| 70 | )} |
| 71 | {children} |
| 72 | </> |
| 73 | ) |
| 74 | )} |
| 75 | </AriaGridListItem> |
| 76 | ); |
| 77 | } |
| 78 | |
| 79 | export function GridListHeader({children, ...props}: HTMLAttributes<HTMLElement>) { |
| 80 | return ( |
nothing calls this directly
no test coverage detected