zent
Version:
一套前端设计语言和基于React的实现
23 lines (22 loc) • 1.08 kB
TypeScript
/// <reference types="react" />
import { TextMarkFindChunksFunction, TextMarkSanitizeFunction, TextMarkSearchWords } from './chunk';
export interface ITextMarkProps extends React.HTMLAttributes<HTMLSpanElement> {
activeClassName?: string;
activeIndex?: number;
activeStyle?: React.CSSProperties;
highlightClassName?: string | {
[key: string]: string;
};
highlightStyle?: React.CSSProperties;
unhighlightClassName?: string;
unhighlightStyle?: React.CSSProperties;
highlightTag?: React.ElementType;
sanitize?: TextMarkSanitizeFunction;
searchWords: TextMarkSearchWords[];
textToHighlight: string;
autoEscape?: boolean;
caseSensitive?: boolean;
className?: string;
findChunks?: TextMarkFindChunksFunction;
}
export declare function TextMark({ textToHighlight, searchWords, highlightClassName, highlightStyle, activeIndex, activeClassName, activeStyle, unhighlightClassName, unhighlightStyle, highlightTag, autoEscape, caseSensitive, sanitize, findChunks, className, ...rest }: ITextMarkProps): JSX.Element;