+ >
)
})
diff --git a/src/components/SearchCard.tsx b/src/components/SearchCard.tsx
index be647ea4a..b6a1eaa10 100644
--- a/src/components/SearchCard.tsx
+++ b/src/components/SearchCard.tsx
@@ -7,7 +7,7 @@ import { usePath } from "~/contexts/PathContext"
import { useClickedObject } from "~/contexts/ClickedContext"
import { allExceptLast, getSeparator } from "~/util"
import { Icon } from "@mdi/react"
-import { mdiFolder, mdiFileSearchOutline, mdiFileOutline } from "@mdi/js"
+import { mdiFolder, mdiFileOutline, mdiMagnify } from "@mdi/js"
function findSearchResults(tree: HydratedGitTreeObject, searchString: string) {
const searchResults: HydratedGitObject[] = []
@@ -49,24 +49,39 @@ export const SearchCard = memo(function SearchCard() {
return (
<>
-
+
+
Search
-
- {
- const value = event.target.value
- startTransition(() => {
- setSearchText(value)
- setSearchResults(findSearchResults(analyzerData.commit.tree, value))
- })
- }}
- />
+
+ {
+ const value = event.target.value
+ startTransition(() => {
+ setSearchText(value)
+ setSearchResults(findSearchResults(analyzerData.commit.tree, value))
+ })
+ }}
+ />
+
+
{isTransitioning || searchText.length > 0 ? (
{isTransitioning ? "Searching..." : searchText.length > 0 ? `${searchResults.length} results` : null}
diff --git a/src/components/Tooltip.tsx b/src/components/Tooltip.tsx
index 534c23479..46e66d26a 100644
--- a/src/components/Tooltip.tsx
+++ b/src/components/Tooltip.tsx
@@ -51,7 +51,7 @@ export const Tooltip = memo(function Tooltip({ hoveredObject, x, y }: TooltipPro
) : (
)}
-
+
{hoveredObject && isBlob(hoveredObject)
? hoveredObject?.name
: allExceptFirst(hoveredObject?.path.split("/") ?? []).map((segment, index, segments) => (
diff --git a/src/components/util.tsx b/src/components/util.tsx
index 80b9c0319..1b43d9297 100644
--- a/src/components/util.tsx
+++ b/src/components/util.tsx
@@ -3,9 +3,15 @@ import { Icon } from "@mdi/react"
import { mdiCheckboxOutline, mdiCheckboxBlankOutline, mdiMenuUp, mdiClose } from "@mdi/js"
import clsx from "clsx"
-export const CloseButton = ({ className = "", ...props }: HTMLAttributes) => (
+export const CloseButton = ({
+ className = "",
+ absolute = true,
+ ...props
+}: HTMLAttributes & { absolute?: boolean }) => (
- {isTransitioning ? "Searching..." : searchText.length > 0 ? `${searchResults.length} results` : null}
+ {isTransitioning ? "Searching..." : searchText.length > 0 ? `${searchResultsArray.length} results` : null}