forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch-button.tsx
More file actions
28 lines (22 loc) · 854 Bytes
/
Copy pathsearch-button.tsx
File metadata and controls
28 lines (22 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"use client";
import Image from "next/image";
import { useSearchContext } from "fumadocs-ui/contexts/search";
// Icons
import LoupeIcon from "@/components/ui/icons/loupe";
import SearchShortcutIcon from "@/components/ui/icons/search-shortcut";
const SearchDialogButton = () => {
const { setOpenSearch } = useSearchContext();
return (
<button
onClick={() => setOpenSearch(true)}
className="-ml-2 lg:ml-0 flex gap-2 items-center px-3 h-11 rounded-lg lg:border cursor-pointer bg-transparent lg:bg-glass-background dark:border-border border-[#01050726]"
>
<LoupeIcon />
<span className="hidden text-sm font-medium text-foreground/50 dark:text-white/50 lg:block">
Search...
</span>
<SearchShortcutIcon className="hidden xl:inline-block" />
</button>
);
};
export default SearchDialogButton;