www: update docs design (#1423)

This commit is contained in:
Marvin Hagemeister
2023-07-10 11:07:49 +02:00
committed by GitHub
parent 4b18dc8b79
commit f061667822
7 changed files with 47 additions and 39 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ import { Head } from "$fresh/runtime.ts";
import { useEffect, useRef } from "preact/hooks";
import docsearch from "https://esm.sh/@docsearch/js@3";
export default function SearchButton() {
export default function SearchButton(props: { class?: string }) {
const ref = useRef<HTMLDivElement>(null);
useEffect(() => {
if (ref.current) {
@@ -22,7 +22,7 @@ export default function SearchButton() {
href="/docsearch.css"
/>
</Head>
<div class="h-9 mb-6" ref={ref}></div>
<div class={"h-9 mb-6 " + (props.class ?? "")} ref={ref}></div>
</>
);
}