MCPcopy Create free account
hub / github.com/anomalyco/models.dev / SearchDialog

Function SearchDialog

packages/web/src/render.tsx:1404–1456  ·  view source on GitHub ↗
(props: { items: SearchIndexItem[] })

Source from the content-addressed store, hash-verified

1402}
1403
1404function SearchDialog(props: { items: SearchIndexItem[] }) {
1405 const json = JSON.stringify(props.items).replace(/</g, "\\u003c");
1406
1407 return (
1408 <dialog
1409 id="search-modal"
1410 class="search-modal"
1411 aria-labelledby="search-modal-title"
1412 >
1413 <div class="search-field">
1414 <svg
1415 class="search-field-icon"
1416 xmlns="http://www.w3.org/2000/svg"
1417 width="18"
1418 height="18"
1419 viewBox="0 0 24 24"
1420 fill="none"
1421 stroke="currentColor"
1422 stroke-width="2"
1423 stroke-linecap="round"
1424 stroke-linejoin="round"
1425 aria-hidden="true"
1426 >
1427 <circle cx="11" cy="11" r="8"></circle>
1428 <path d="m21 21-4.35-4.35"></path>
1429 </svg>
1430 <input
1431 id="search-input"
1432 type="text"
1433 placeholder="Search models, providers, and labs"
1434 autocomplete="off"
1435 spellcheck="false"
1436 role="combobox"
1437 aria-expanded="true"
1438 aria-controls="search-results"
1439 aria-autocomplete="list"
1440 />
1441 <span class="search-escape">Esc</span>
1442 </div>
1443 <h2 id="search-modal-title" class="sr-only">
1444 Search
1445 </h2>
1446 <div id="search-count" class="search-count"></div>
1447 <div id="search-results" class="search-results" role="listbox"></div>
1448 <p id="search-empty" class="search-empty">No matching results.</p>
1449 <script
1450 id="search-index"
1451 type="application/json"
1452 dangerouslySetInnerHTML={{ __html: json }}
1453 />
1454 </dialog>
1455 );
1456}
1457
1458function HelpDialog() {
1459 return (

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected