Add proper isLoading implementation/spinning icon, detectedType prop stub

This commit is contained in:
2024-05-09 21:45:23 -05:00
parent ec4036a45b
commit cb798c4ec1
2 changed files with 18 additions and 4 deletions

View File

@@ -8,6 +8,7 @@ import {
CheckIcon,
ChevronUpDownIcon,
MagnifyingGlassIcon,
ArrowPathIcon,
} from "@heroicons/react/20/solid";
import { Listbox, Transition } from "@headlessui/react";
import clsx from "clsx";
@@ -89,10 +90,17 @@ const LookupInput: FunctionComponent<LookupInputProps> = ({
const searchIcon = (
<>
<div className="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3">
<MagnifyingGlassIcon
className="h-5 w-5 text-zinc-400"
aria-hidden="true"
/>
{isLoading ? (
<ArrowPathIcon
className="h-5 w-5 text-zinc-400 animate-spin"
aria-hidden="true"
/>
) : (
<MagnifyingGlassIcon
className="h-5 w-5 text-zinc-400"
aria-hidden="true"
/>
)}
</div>
</>
);