mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-06 12:27:44 +00:00
34 lines
705 B
TypeScript
34 lines
705 B
TypeScript
"use client";
|
|
|
|
import { Search } from "lucide-react";
|
|
import { useSearchContext } from "fumadocs-ui/provider";
|
|
import { Button } from "@/components/ui/button";
|
|
import { cn } from "@/lib/utils";
|
|
|
|
interface MobileSearchIconProps {
|
|
className?: string;
|
|
}
|
|
|
|
export function MobileSearchIcon({ className }: MobileSearchIconProps) {
|
|
const { setOpenSearch } = useSearchContext();
|
|
|
|
const handleSearchClick = () => {
|
|
setOpenSearch(true);
|
|
};
|
|
|
|
return (
|
|
<Button
|
|
variant="ghost"
|
|
size="icon"
|
|
aria-label="Search"
|
|
onClick={handleSearchClick}
|
|
className={cn(
|
|
"flex ring-0 shrink-0 md:hidden size-9 hover:bg-transparent",
|
|
className,
|
|
)}
|
|
>
|
|
<Search className="size-4" />
|
|
</Button>
|
|
);
|
|
}
|