import { Portal } from "solid-js/web" import { useI18n } from "../context/i18n" import { Icon } from "./icon" export function FileSearchBar(props: { pos: () => { top: number; right: number } query: () => string index: () => number count: () => number setInput: (el: HTMLInputElement) => void onInput: (value: string) => void onKeyDown: (event: KeyboardEvent) => void onClose: () => void onPrev: () => void onNext: () => void }) { const i18n = useI18n() return (
e.stopPropagation()} > props.onInput(e.currentTarget.value)} onKeyDown={(e) => props.onKeyDown(e as KeyboardEvent)} />
{props.count() ? `${props.index() + 1}/${props.count()}` : "0/0"}
) }