UNPKG

@helpwave/hightide

Version:

helpwave's component and theming library

23 lines (20 loc) 787 B
import * as react_jsx_runtime from 'react/jsx-runtime'; import { ReactNode } from 'react'; import { PropsForTranslation } from '../hooks/useTranslation.mjs'; import '../hooks/useLanguage.mjs'; type SearchableListTranslation = { search: string; nothingFound: string; }; type SearchableListProps<T> = { list: T[]; initialSearch?: string; searchMapping: (value: T) => string[]; itemMapper: (value: T) => ReactNode; className?: string; }; /** * A component for searching a list */ declare const SearchableList: <T>({ overwriteTranslation, list, initialSearch, searchMapping, itemMapper, className }: PropsForTranslation<SearchableListTranslation, SearchableListProps<T>>) => react_jsx_runtime.JSX.Element; export { SearchableList, type SearchableListProps };