({
collection,
layout,
orientation,
...props
}: Omit<GridListProps, 'children'> & {collection: ICollection<Node<object>>})
| 92 | } |
| 93 | |
| 94 | function GridListInner({ |
| 95 | collection, |
| 96 | layout, |
| 97 | orientation, |
| 98 | ...props |
| 99 | }: Omit<GridListProps, 'children'> & {collection: ICollection<Node<object>>}) { |
| 100 | /*- begin highlight -*/ |
| 101 | let state = useListState({...props, collection, children: undefined}); |
| 102 | let ref = useRef<HTMLDivElement>(null); |
| 103 | let {gridProps} = useGridList(props, state, ref); |
| 104 | /*- end highlight -*/ |
| 105 | |
| 106 | return ( |
| 107 | <div |
| 108 | {...gridProps} |
| 109 | ref={ref} |
| 110 | className="react-aria-GridList" |
| 111 | data-layout={layout} |
| 112 | data-orientation={orientation}> |
| 113 | <ListStateContext.Provider value={state}> |
| 114 | {[...state.collection].map(item => ( |
| 115 | <Fragment key={item.key}>{item.render!(item)}</Fragment> |
| 116 | ))} |
| 117 | </ListStateContext.Provider> |
| 118 | </div> |
| 119 | ); |
| 120 | } |
| 121 | |
| 122 | export {Text}; |
nothing calls this directly
no test coverage detected