Files
homarr/apps/nextjs/src/components/layout/header/search.tsx
Meier Lukas 770768eb21 fix: rtl common translation unnecessary (#1246)
* fix: rtl common translation unnecessary

* fix: format issue
2024-10-05 16:31:15 +02:00

36 lines
872 B
TypeScript

"use client";
import { TextInput, UnstyledButton } from "@mantine/core";
import { IconSearch } from "@tabler/icons-react";
import { openSpotlight } from "@homarr/spotlight";
import { useI18n } from "@homarr/translation/client";
import { HeaderButton } from "./button";
import classes from "./search.module.css";
export const DesktopSearchInput = () => {
const t = useI18n();
return (
<TextInput
component={UnstyledButton}
className={classes.desktopSearch}
w={400}
size="sm"
leftSection={<IconSearch size={20} stroke={1.5} />}
onClick={openSpotlight}
>
{`${t("search.placeholder")}...`}
</TextInput>
);
};
export const MobileSearchButton = () => {
return (
<HeaderButton onClick={openSpotlight} className={classes.mobileSearch}>
<IconSearch size={20} stroke={1.5} />
</HeaderButton>
);
};