Skip to content

Commit

Permalink
Update PredictiveSearchResult component to adjust spacing based on it…
Browse files Browse the repository at this point in the history
…em type
  • Loading branch information
hta218 committed Aug 17, 2024
1 parent 30c1156 commit fff9bfc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/components/predictive-search/PredictiveSearchResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ export function PredictiveSearchResult({
<ul
className={clsx(
"pt-5",
type === "products" ? "space-y-4" : "space-y-1",
type === "queries" && "space-y-1",
type === "articles" && "space-y-3",
type === "products" && "space-y-4",
)}
>
{items.map((item: NormalizedPredictiveSearchResultItem) => (
Expand Down
3 changes: 3 additions & 0 deletions app/components/predictive-search/PredictiveSearchResults.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Link } from "@remix-run/react";
import { PredictiveSearchResult } from "./PredictiveSearchResult";
import { usePredictiveSearch } from "./usePredictiveSearch";
import { IconArrowRight } from "../Icons";

export function PredictiveSearchResults() {
let { results, totalResults, searchTerm, searchInputRef } =
Expand Down Expand Up @@ -64,8 +65,10 @@ export function PredictiveSearchResults() {
<Link
onClick={goToSearchResult}
to={`/search?q=${searchTerm.current}`}
className="flex items-center gap-2"
>
<span className="underline-animation">View all products</span>
<IconArrowRight className="w-4 h-4 mb-[3px]" />
</Link>
</div>
)}
Expand Down

0 comments on commit fff9bfc

Please sign in to comment.