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

Function IconsPageSearch

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

Source from the content-addressed store, hash-verified

282}
283
284export function IconsPageSearch() {
285 let filter = useIconFilter();
286 let {copiedId, handleCopyImport} = useCopyImport();
287
288 return (
289 <>
290 <Autocomplete filter={filter}>
291 <div className={style({display: 'flex', flexDirection: 'column', gap: 8})}>
292 <SearchField size="L" aria-label="Search icons" placeholder="Search icons" />
293 <InfoMessage>
294 Press an item to copy its import statement. See <Link href="icons">Icons</Link> for more
295 information.
296 </InfoMessage>
297 <IconListBox
298 items={iconList}
299 copiedId={copiedId}
300 onAction={handleCopyImport}
301 listBoxClassName={style({
302 height: 440,
303 width: '100%',
304 maxHeight: '100%',
305 overflow: 'auto',
306 scrollPaddingY: 4
307 })}
308 />
309 </div>
310 </Autocomplete>
311 </>
312 );
313}

Callers

nothing calls this directly

Calls 2

useIconFilterFunction · 0.85
useCopyImportFunction · 0.70

Tested by

no test coverage detected