21 lines
749 B
TypeScript
21 lines
749 B
TypeScript
import { Search } from 'lucide-react'
|
|
|
|
interface SearchBarProps {
|
|
value: string
|
|
onChange: (value: string) => void
|
|
}
|
|
|
|
export default function SearchBar({ value, onChange }: SearchBarProps) {
|
|
return (
|
|
<div className="relative w-full max-w-md">
|
|
<Search className="absolute left-4 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400" />
|
|
<input
|
|
type="text"
|
|
placeholder="Поиск по модели, бренду, применению..."
|
|
value={value}
|
|
onChange={(e) => onChange(e.target.value)}
|
|
className="w-full pl-11 pr-4 py-3 bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-2xl focus:outline-none focus:ring-2 focus:ring-sky-500 text-sm"
|
|
/>
|
|
</div>
|
|
)
|
|
} |