quivr/frontend/app/brains-management/[brainId]/components/BrainSearchBar/BrainSearchBar.tsx

25 lines
537 B
TypeScript
Raw Normal View History

import Field from "@/lib/components/ui/Field";
type BrainSearchBarProps = {
searchQuery: string;
setSearchQuery: (searchQuery: string) => void;
};
export const BrainSearchBar = ({
searchQuery,
setSearchQuery,
}: BrainSearchBarProps): JSX.Element => {
return (
<div className="m-2">
<Field
name="brainsearch"
placeholder="Search for a brain"
autoFocus
autoComplete="off"
value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)}
/>
</div>
);
};