This commit is contained in:
Mckay Wrigley
2023-03-27 09:38:56 -06:00
committed by GitHub
parent 2269403806
commit 34c79c0d66
51 changed files with 1744 additions and 295 deletions
+5 -4
View File
@@ -1,13 +1,14 @@
import { IconX } from '@tabler/icons-react';
import { FC } from 'react';
import { useTranslation } from 'next-i18next';
import { FC } from 'react';
interface Props {
placeholder: string;
searchTerm: string;
onSearch: (searchTerm: string) => void;
}
export const Search: FC<Props> = ({ searchTerm, onSearch }) => {
export const Search: FC<Props> = ({ placeholder, searchTerm, onSearch }) => {
const { t } = useTranslation('sidebar');
const handleSearchChange = (e: React.ChangeEvent<HTMLInputElement>) => {
@@ -21,9 +22,9 @@ export const Search: FC<Props> = ({ searchTerm, onSearch }) => {
return (
<div className="relative flex items-center">
<input
className="w-full flex-1 rounded-md border border-neutral-600 bg-[#202123] px-4 py-3 pr-10 text-[12px] leading-3 text-white"
className="w-full flex-1 rounded-md border border-neutral-600 bg-[#202123] px-4 py-3 pr-10 text-[14px] leading-3 text-white"
type="text"
placeholder={t('Search conversations...') || ''}
placeholder={t(placeholder) || ''}
value={searchTerm}
onChange={handleSearchChange}
/>