Skip to content

Commit

Permalink
Fix bottom marge in search results
Browse files Browse the repository at this point in the history
  • Loading branch information
moloch-- committed Dec 16, 2023
1 parent a0a59ee commit 5d8d3a5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
33 changes: 19 additions & 14 deletions docs/sliver-docs/components/navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import { SliversIcon } from "@/components/icons/slivers";
import { useSearchContext } from "@/util/search-context";
import { Themes } from "@/util/themes";
Expand All @@ -17,6 +19,7 @@ import {
NavbarBrand,
NavbarContent,
NavbarItem,
Tooltip,
} from "@nextui-org/react";
import { useTheme } from "next-themes";
import { useRouter } from "next/router";
Expand Down Expand Up @@ -99,20 +102,22 @@ export default function TopNavbar(props: TopNavbarProps) {
</NavbarContent>

<NavbarContent as="div" justify="end">
<Input
size="sm"
placeholder="Search..."
value={query}
onChange={(e) => setQuery(e.target.value)}
onClear={() => setQuery("")}
startContent={<FontAwesomeIcon icon={faSearch} />}
onKeyDown={(e) => {
if (e.key === "Enter") {
router.push(`/search/`, { query: { search: query } });
setQuery("");
}
}}
/>
<Tooltip content="Press enter to search" isOpen={query.length > 0}>
<Input
size="sm"
placeholder="Search..."
value={query}
onChange={(e) => setQuery(e.target.value)}
onClear={() => setQuery("")}
startContent={<FontAwesomeIcon icon={faSearch} />}
onKeyDown={(e) => {
if (e.key === "Enter") {
router.push(`/search/`, { query: { search: query } });
setQuery("");
}
}}
/>
</Tooltip>

<Button
variant="ghost"
Expand Down
2 changes: 2 additions & 0 deletions docs/sliver-docs/pages/search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ const SearchPage: NextPage = (props: SearchPageProps) => {
))}
</div>
<div className="col-span-1"></div>

<div className="col-span-12 mb-8"></div>
</div>
);
};
Expand Down

0 comments on commit 5d8d3a5

Please sign in to comment.