add search icon to the docs search button

This commit is contained in:
Lee 2024-04-21 17:13:46 +01:00
parent ab2716a8c9
commit 738fcb8e24
4 changed files with 13 additions and 8 deletions

@ -15,11 +15,11 @@ GET /player/:part/:query
## Parts ## Parts
| Part | Description | | Part | Description |
|------|-----------------------| |------|---------------------------------|
| head | Get the player's head | | head | Get the player's isometric head |
| face | Get the player's face | | face | Get the player's face |
| body | Get the player's body | | body | Get the player's body |
## Parameters ## Parameters

@ -5,6 +5,7 @@ import { Button } from "@/app/components/ui/button";
import { Dialog, DialogContent, DialogTitle, DialogTrigger } from "@/app/components/ui/dialog"; import { Dialog, DialogContent, DialogTitle, DialogTrigger } from "@/app/components/ui/dialog";
import { DocsContentMetadata } from "@/app/common/documentation"; import { DocsContentMetadata } from "@/app/common/documentation";
import { DocumentationPages } from "@/app/components/docs/documentation-pages"; import { DocumentationPages } from "@/app/components/docs/documentation-pages";
import { SearchIcon } from "lucide-react";
export function Search(): ReactElement { export function Search(): ReactElement {
/** /**
@ -41,7 +42,10 @@ export function Search(): ReactElement {
<div className="flex flex-col w-full"> <div className="flex flex-col w-full">
<Dialog> <Dialog>
<DialogTrigger asChild> <DialogTrigger asChild>
<Button>Search</Button> <Button className="flex items-center gap-1">
<SearchIcon width={16} height={16} />
<p>Search</p>
</Button>
</DialogTrigger> </DialogTrigger>
<DialogContent className="w-screen md:w-[600px]"> <DialogContent className="w-screen md:w-[600px]">
<DialogTitle>Search Documentation</DialogTitle> <DialogTitle>Search Documentation</DialogTitle>

@ -61,7 +61,7 @@ export default function NavBar(): ReactElement {
<div className="absolute inset-x-0 flex justify-center"> <div className="absolute inset-x-0 flex justify-center">
<div className="flex gap-4"> <div className="flex gap-4">
{pages.map((page, index) => { {pages.map((page, index) => {
const isActive = path.includes(page.url); const isActive: boolean = path ? path.includes(page.url) : false;
return ( return (
<HrefButton <HrefButton

@ -1,7 +1,8 @@
import Link from "next/link"; import Link from "next/link";
import { Button } from "@/app/components/ui/button"; import { Button } from "@/app/components/ui/button";
import { ReactElement } from "react";
export default function NotFound() { export default function NotFound(): ReactElement {
return ( return (
<div className="flex text-center flex-col gap-4"> <div className="flex text-center flex-col gap-4">
<div> <div>