UNPKG

@helpwave/hightide

Version:

helpwave's component and theming library

25 lines (22 loc) 1.1 kB
import * as react_jsx_runtime from 'react/jsx-runtime'; import { ReactNode } from 'react'; import { PropsForTranslation } from '../../localization/useTranslation.js'; import { UseSearchProps } from '../../hooks/useSearch.js'; import { FormTranslationType } from '../../localization/defaults/form.js'; import '../../localization/util.js'; type SearchableListAddonTranslation = { nothingFound: string; }; type SearchableListTranslation = SearchableListAddonTranslation & FormTranslationType; type SearchableListProps<T> = UseSearchProps<T> & { autoFocus?: boolean; minimumItemsForSearch?: number; itemMapper: (value: T, index: number) => ReactNode; className?: string; resultListClassName?: string; }; /** * A component for searching a list */ declare const SearchableList: <T>({ overwriteTranslation, list, initialSearch, searchMapping, autoFocus, minimumItemsForSearch, itemMapper, className, resultListClassName }: PropsForTranslation<SearchableListTranslation, SearchableListProps<T>>) => react_jsx_runtime.JSX.Element; export { SearchableList, type SearchableListProps };