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

Function IconSearchView

packages/dev/s2-docs/src/IconSearchView.tsx:163–180  ·  view source on GitHub ↗
({filteredItems, listBoxClassName}: IconSearchViewProps)

Source from the content-addressed store, hash-verified

161}
162
163export function IconSearchView({filteredItems, listBoxClassName}: IconSearchViewProps) {
164 let {copiedId, handleCopyImport} = useCopyImport();
165
166 return (
167 <>
168 <InfoMessage>
169 Press an item to copy its import statement. See <Link href="icons">Icons</Link> for more
170 information.
171 </InfoMessage>
172 <IconListBox
173 items={filteredItems}
174 copiedId={copiedId}
175 onAction={handleCopyImport}
176 listBoxClassName={listBoxClassName}
177 />
178 </>
179 );
180}
181
182function IconItem({item, isCopied = false}: {item: (typeof iconList)[number]; isCopied?: boolean}) {
183 let Icon = item.icon;

Callers

nothing calls this directly

Calls 1

useCopyImportFunction · 0.70

Tested by

no test coverage detected