MCPcopy Create free account
hub / github.com/adobe/react-spectrum / IconSearchSkeleton

Function IconSearchSkeleton

packages/dev/s2-docs/src/IconSearchView.tsx:260–282  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

258}
259
260export function IconSearchSkeleton() {
261 const mockItems = useMemo(() => Array.from({length: 140}, (_, i) => ({id: `skeleton-${i}`})), []);
262
263 return (
264 <Skeleton isLoading>
265 <Virtualizer
266 layout={GridLayout}
267 layoutOptions={{
268 minItemSize: new Size(64, 64),
269 maxItemSize: new Size(64, 64),
270 minSpace: new Size(12, 12),
271 preserveAspectRatio: true
272 }}>
273 <ListBox
274 items={mockItems}
275 layout="grid"
276 className={style({flexGrow: 1, overflow: 'auto', width: '100%', scrollPaddingY: 4})}>
277 {item => <SkeletonIconItem item={item} />}
278 </ListBox>
279 </Virtualizer>
280 </Skeleton>
281 );
282}
283
284export function IconsPageSearch() {
285 let filter = useIconFilter();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected