2025-02-18 15:11:44 +05:30
|
|
|
import { observer } from "mobx-react";
|
|
|
|
|
import { Search } from "lucide-react";
|
2025-05-28 00:58:22 +05:30
|
|
|
// plane imports
|
|
|
|
|
import { useTranslation } from "@plane/i18n";
|
2025-02-18 15:11:44 +05:30
|
|
|
// hooks
|
2025-08-15 13:10:26 +05:30
|
|
|
import { useCommandPalette } from "@/hooks/store/use-command-palette";
|
2025-02-18 15:11:44 +05:30
|
|
|
|
|
|
|
|
export const AppSearch = observer(() => {
|
|
|
|
|
// store hooks
|
|
|
|
|
const { toggleCommandPaletteModal } = useCommandPalette();
|
2025-05-28 00:58:22 +05:30
|
|
|
// translation
|
|
|
|
|
const { t } = useTranslation();
|
2025-02-18 15:11:44 +05:30
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<button
|
2025-05-28 00:58:22 +05:30
|
|
|
type="button"
|
2025-07-08 20:18:39 +05:30
|
|
|
className="flex-shrink-0 size-8 aspect-square grid place-items-center rounded hover:bg-custom-sidebar-background-90 outline-none border-[0.5px] border-custom-sidebar-border-300"
|
2025-02-18 15:11:44 +05:30
|
|
|
onClick={() => toggleCommandPaletteModal(true)}
|
2025-05-28 00:58:22 +05:30
|
|
|
aria-label={t("aria_labels.projects_sidebar.open_command_palette")}
|
2025-02-18 15:11:44 +05:30
|
|
|
>
|
|
|
|
|
<Search className="size-4 text-custom-sidebar-text-300" />
|
|
|
|
|
</button>
|
|
|
|
|
);
|
|
|
|
|
});
|