Olympus/frontend/athena/components/common/SearchInput.tsx

29 lines
629 B
TypeScript

"use client";
import { Search } from "lucide-react";
import { Input } from "@/components/ui/input";
type Props = {
value: string;
onChange: (value: string) => void;
placeholder?: string;
};
export default function SearchInput({
value,
onChange,
placeholder = "Suchen",
}: Props) {
return (
<div className="relative w-full max-w-sm">
<Search className="absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-slate-400" />
<Input
value={value}
onChange={(event) => onChange(event.target.value)}
placeholder={placeholder}
className="pl-8"
/>
</div>
);
}