react-highlight-search
Version:
Text highlight with deep search through DOM elements.
23 lines (19 loc) • 858 B
TypeScript
import React from 'react';
type OnMatchDataPropsType = {
wrapperIndex: number;
matchesFound: number;
matchParentElement: HTMLDivElement | null;
};
type OnMatchDataType = (matchData: OnMatchDataPropsType) => void;
type PageSearchWrapperProps = {
searchString: string;
setTriggerSearch?: React.Dispatch<React.SetStateAction<((text: string) => void) | undefined>>;
searchMinLength?: number;
onMatchData?: OnMatchDataType;
children: React.ReactElement | JSX.Element;
spanClassName?: string;
ignoreCase?: boolean;
index?: number;
};
declare const _default: React.MemoExoticComponent<({ searchString, setTriggerSearch, searchMinLength, onMatchData, children, spanClassName, ignoreCase, index, }: PageSearchWrapperProps) => React.JSX.Element>;
export { _default as HighlightSearchWrapper, type OnMatchDataPropsType };