import * as React from 'react' import { Search, X } from 'lucide-react' import { cn } from '@/lib/utils' import { Input } from './input' /** * SearchInput — Input с magnifying-glass иконкой слева и optional clear button * справа когда есть value. Заменяет {@code @nstart/ui} SearchInput. */ export type SearchInputProps = Omit, 'type'> & { onClear?: () => void } export const SearchInput = React.forwardRef( function SearchInput({ className, value, onClear, ...props }, ref) { const hasValue = value !== undefined && value !== '' return (
{hasValue && onClear && ( )}
) }, )