import { Search, X, Command } from 'lucide-react'; import { Input } from '@/components/ui/input'; import { Button } from '@/components/ui/button'; import { cn } from '@/lib/utils'; interface SearchBarProps { value: string; onChange: (value: string) => void; placeholder?: string; className?: string; compact?: boolean; } export function SearchBar({ value, onChange, placeholder = 'Search skills, aliases, keywords…', className, compact = false, }: SearchBarProps) { return (
onChange(e.target.value)} placeholder={placeholder} className={cn( 'pl-10 pr-20 bg-background/80 border-border/60 rounded-lg shadow-sm focus:border-primary/50 focus:ring-2 focus:ring-primary/20 transition-all duration-200', compact ? 'h-8 text-sm pl-9 pr-16' : 'h-11 rounded-xl' )} aria-label="Search skills" /> {!value && ( K )} {value && ( )}
); }