You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @helior and many thanks for your library! With react-highlighter I got from zero to all done in just 10 minutes, which is mind-blowing even in the React world!
I'm writing to share a minor issue I've faced when using <Highlight /> together with styled-components. Here's my code:
This produces a warning in development environment:
Warning: Failed prop type: Invalid prop `matchElement` of type `function` supplied to `Highlighter`, expected `string`.
It'd be great if matchElement in PropTypes allowed using custom react components in addition to strings. The issue is only with the warning – all working great apart from that 🎉
The text was updated successfully, but these errors were encountered:
Hi @kachkaev, I'm glad to hear you were up in running so quickly 👍 . This is a great idea to define components for the matching element. If you have a PR, I would be happy to release a version with the new feature.
Hi @helior and many thanks for your library! With
react-highlighter
I got from zero to all done in just 10 minutes, which is mind-blowing even in the React world!I'm writing to share a minor issue I've faced when using
<Highlight />
together withstyled-components
. Here's my code:This produces a warning in development environment:
It'd be great if
matchElement
in PropTypes allowed using custom react components in addition to strings. The issue is only with the warning – all working great apart from that 🎉The text was updated successfully, but these errors were encountered: