"use client"; /** * Props interface for the SearchBar component * @property onSearch - Callback function triggered when search input changes */ interface SearchBarProps { onSearch: (query: string) => void; } /** * SearchBar component that provides a styled search input with an icon * Features: * - Real-time search with onChange event * - Glassmorphic design with backdrop blur * - Responsive width with max-width constraint * - Animated focus state with primary color ring */ export default function SearchBar({ onSearch }: SearchBarProps) { return (
{/* Search input field with glassmorphic styling */} onSearch(e.target.value)} className="w-full rounded-2xl border border-border/50 bg-background-primary/50 px-4 py-6 pl-12 pr-36 backdrop-blur-sm shadow-lg focus:outline-none focus:ring-2 focus:ring-primary/50 text-lg transition-all duration-200 placeholder:text-text-secondary/50" /> {/* Search icon positioned absolutely within the input */}
); }