File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
types/react-highlight-words Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export interface Chunk {
21
21
end : number ;
22
22
}
23
23
24
- interface HighlighterProps {
24
+ export interface HighlighterProps {
25
25
/** The class name to be applied to an active match. Use along with activeIndex */
26
26
activeClassName ?: string ;
27
27
/** Specify the match index that should be actively highlighted. Use along with activeClassName */
@@ -62,6 +62,8 @@ interface HighlighterProps {
62
62
unhighlightClassName ?: string ;
63
63
/** Inline styles applied to unhighlighted text */
64
64
unhighlightStyle ?: React . CSSProperties ;
65
+ /** Allows to pass through any parameter to wrapped component */
66
+ [ index : string ] : any ;
65
67
}
66
68
67
69
declare class Highlighter extends React . Component < HighlighterProps > { }
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ class HighlighterTest extends React.Component {
16
16
highlightTag = "span"
17
17
searchWords = { [ "el" , "or" ] }
18
18
textToHighlight = "Hello World"
19
+ customProp = "My Custom Prop"
19
20
/>
20
21
< Highlighter
21
22
activeClassName = "activeClassName"
You can’t perform that action at this time.
0 commit comments