import { Dispatch, SetStateAction } from 'react'; import './InputSearchInList.css'; import '../../Doc/Colors/Colors.css'; import '../../Doc/Typographies/Typography.css'; interface InputSearchInListTypes { onSearch: (any: any) => void; filteredList: any[]; onSelectInList: (itemInList: any) => void; defaultSelectedItem?: any; borderRadius?: string; color?: string; placeholder?: string; addClass?: string; dataTestId?: string; addClassInput?: string; notFoundText?: string; backgroundColor?: string; backgroundColorIconSearch?: string; addClassScroll?: string; colorNotFoundText?: string; notFoundAction?: () => void; onClear?: () => void; setBrand?: Dispatch>; setIsActive?: Dispatch>; } /** ##Utilisation: * * Le composant InputSearchInList permet de faire une recherche dans une liste donnée. * * ###Props à implémenter obligatoirement : * * - onSearch : fonction qui s'éxecutera afin d'effectuer la recherche ayant pour argument une string qui doit être passée en propriété * - filteredList : liste des valeurs * - onSelectInList : * * ###Props facultatives : * * - placeholder : nom de l'input * - addClass : permet d'ajouter une classe au container du composant * - addClassInput : permet d'ajouter une classe à l'input * - notFoundText : texte si aucune valeur correspondante trouvée * - notFoundAction : fonction à exécuter si aucune valeur correspondante trouvée * - defaultSelectedItem : valeur par défaut de l'input * - borderRadius : permet d'indiquer le radius de l'input * - color : couleur du texte * - backgroundColor : couleur de fond de l'input * - backgroundColorIconSearch : couleur de fond de l'icône de recherche * - addClassScroll : permet d'ajouter une classe au scroll (pour contrôler la couleur par exemple) * - colorNotFoundText : couleur du texte si aucune valeur correspondante trouvée * - onClear : fonction à exécuter lors du clic sur la croix * - dataTestId : attribut à renseigner pour que le composant soit facilement ciblable avec Playwright * * ## Exemple d'usage: * ```jsx const [searchValue, setSearchValue = useState(''); const onSearch = (textFromSearch) => { setSearchValue(textFromSearch) } return ( ); * ``` */ declare function InputSearchInList({ setIsActive, setBrand, colorNotFoundText, backgroundColor, color, placeholder, backgroundColorIconSearch, addClassInput, borderRadius, onSearch, filteredList, onSelectInList, notFoundAction, notFoundText, dataTestId, onClear, defaultSelectedItem, addClass, addClassScroll, }: InputSearchInListTypes): JSX.Element; declare namespace InputSearchInList { var defaultProps: { color: string; backgroundColor: string; backgroundColorIconSearch: string; placeholder: string; addClass: string; dataTestId: string; borderRadius: string; addClassInput: string; notFoundText: string; notFoundAction: undefined; onClear: undefined; defaultSelectedItem: string; setBrand: undefined; setIsActive: undefined; addClassScroll: string; colorNotFoundText: string; }; } export default InputSearchInList;