'use client'; import { Search, X } from 'lucide-react'; import { motion } from 'framer-motion'; interface SearchBarProps { value: string; onChange: (value: string) => void; placeholder?: string; className?: string; } export function SearchBar({ value, onChange, placeholder = 'Search posts...', className = '' }: SearchBarProps) { const handleClear = () => { onChange(''); }; return (
onChange(e.target.value)} placeholder={placeholder} className="w-full pl-12 pr-12 py-3 bg-background/50 border border-border rounded-lg text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-all" /> {value && ( )}
); }