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

Function IconsPageSearch

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

useIconFilterFunction · 0.85
useCopyImportFunction · 0.70

Tested by

no test coverage detected