analytica-frontend-lib
Version:
Repositório público dos componentes utilizados nas plataformas da Analytica Ensino
28 lines (25 loc) • 1.12 kB
TypeScript
import * as react from 'react';
import { InputHTMLAttributes } from 'react';
declare const Search: react.ForwardRefExoticComponent<{
/** List of options to show in dropdown */
options: string[];
/** Callback when an option is selected from dropdown */
onSelect?: (value: string) => void;
/** Callback when search input changes */
onSearch?: (query: string) => void;
/** Control dropdown visibility externally */
showDropdown?: boolean;
/** Callback when dropdown open state changes */
onDropdownChange?: (open: boolean) => void;
/** Maximum height of dropdown in pixels */
dropdownMaxHeight?: number;
/** Text to show when no results are found */
noResultsText?: string;
/** Additional CSS classes to apply to the input */
className?: string;
/** Additional CSS classes to apply to the container */
containerClassName?: string;
/** Callback when clear button is clicked */
onClear?: () => void;
} & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "onSelect"> & react.RefAttributes<HTMLInputElement>>;
export { Search as default };