"use client"; import Link from "next/link"; import { Search, X } from "lucide-react"; interface SearchBarProps { value: string; onChange: (v: string) => void; placeholder?: string; autoFocus?: boolean; onClear?: () => void; } export default function SearchBar({ value, onChange, placeholder, autoFocus, onClear }: SearchBarProps) { return (
onChange(e.target.value)} placeholder={placeholder ?? "Search knowledge base..."} autoFocus={autoFocus} className="w-full pl-10 pr-9 py-3 bg-[var(--bg-elevated)] border border-[var(--border-color)] hover:border-[var(--text-muted)] rounded-lg text-[var(--text-primary)] placeholder-[var(--text-dim)] focus:outline-none focus:border-[var(--text-primary)] text-sm transition-all" /> {value && ( )}
); } export function InlineSearchBar({ value, onChange, placeholder, }: { value: string; onChange: (v: string) => void; placeholder?: string; }) { return (
onChange(e.target.value)} placeholder={placeholder ?? "Filter index..."} className="w-full pl-8 pr-7 py-1.5 bg-[var(--bg-surface)] border border-[var(--border-color)] hover:border-[var(--text-muted)] rounded-md text-xs text-[var(--text-primary)] placeholder-[var(--text-dim)] focus:outline-none focus:border-[var(--text-primary)] transition-all" /> {value && ( )}
); }