import React from 'react'; import { transitions } from '@/lib/animations'; import { Search, X } from 'lucide-react'; import Input from '@/components/ui/Input.tsx'; interface SearchInputProps extends React.InputHTMLAttributes { containerClassName?: string; showClearButton?: boolean; onClear?: () => void; } const SearchInput = React.forwardRef( ({ className, containerClassName, id, name, value, showClearButton, onClear, ...props }, ref) => { const inputId = id || 'search-input'; const inputName = name || 'search-input'; const hasValue = value && String(value).length > 0; return (
{showClearButton && hasValue && onClear && ( )}
); } ); SearchInput.displayName = 'SearchInput'; export default SearchInput;