mirror of
https://github.com/tale/headplane.git
synced 2026-10-26 22:47:55 +00:00
31 lines
805 B
TypeScript
31 lines
805 B
TypeScript
import { useStaticSearch } from "fumadocs-core/search/client";
|
|
import {
|
|
SearchDialog,
|
|
SearchDialogClose,
|
|
SearchDialogContent,
|
|
SearchDialogHeader,
|
|
SearchDialogIcon,
|
|
SearchDialogInput,
|
|
SearchDialogList,
|
|
SearchDialogOverlay,
|
|
type SharedProps,
|
|
} from "fumadocs-ui/components/dialog/search";
|
|
|
|
export default function DocsSearchDialog(props: SharedProps) {
|
|
const search = useStaticSearch({ from: `${import.meta.env.BASE_URL}api/search` });
|
|
|
|
return (
|
|
<SearchDialog {...search} {...props}>
|
|
<SearchDialogOverlay />
|
|
<SearchDialogContent>
|
|
<SearchDialogHeader>
|
|
<SearchDialogIcon />
|
|
<SearchDialogInput />
|
|
<SearchDialogClose />
|
|
</SearchDialogHeader>
|
|
<SearchDialogList />
|
|
</SearchDialogContent>
|
|
</SearchDialog>
|
|
);
|
|
}
|