fixing the test

This commit is contained in:
Leo Salgueiro
2019-01-28 18:33:37 -08:00
parent 35e3d24f05
commit 4d254b9d09
@@ -6,17 +6,20 @@ const findChunks = ({
textToHighlight
}: FindChunks) => [];
const CustomHighlight: React.FC = ({children}) => (<span>{children}</span>)
class HighlighterTest extends React.Component {
render() {
return (
<div>
<Highlighter
highlightTag="span"
searchWords={["el", "or"]}
textToHighlight="Hello World"
/>
<Highlighter
activeClassName="activeClassName"
activeIndex="activeIndex"
activeIndex={1}
activeStyle={{ color: "red" }}
autoEscape={true}
className="className"
@@ -24,7 +27,7 @@ class HighlighterTest extends React.Component {
findChunks={findChunks}
highlightClassName="highlightClassName"
highlightStyle={{ color: "red" }}
highlightTag="span"
highlightTag={CustomHighlight}
sanitize={(text: string) => text}
searchWords={["el", "or"]}
textToHighlight="Hello World"