import { Show } from "solid-js"; import type { Refs } from "../lib/refs"; /** * Narrowing the sidebar down. * * A `search` input rather than a plain text one: it carries the right * semantics, and browsers give it a clear affordance for free. Escape is * handled explicitly because whether it clears the field is left to the * browser otherwise, and WebKit and Chromium do not agree. */ export default function RefFilter(props: { refs: Refs }) { function onKeyDown(event: KeyboardEvent) { if (event.key !== "Escape") return; event.preventDefault(); props.refs.setQuery(""); } return (