Closed mdarens closed 7 years ago
Hi,
I'm not really using this lib anymore. If you'd like to create a PR that adds this feature, I'll review it. I don't really have any thoughts about it though. 😄
@mdarens there is a PR for this: https://github.com/bvaughn/react-highlight-words/pull/27
Released via 0.8.0
Currently there is no way to pass a custom
className
to the text chunks which aren't highlighted. My use case is that I have a highlight style with negative margins matching the padding as I want the background not to be flush with the glyph boundaries while also preventing reflow in a large collection as the highlight changes. Unfortunately, without the ability to set a block formatting context so thatz-index
will work on the plain children of the component, the source order controls their stacking and text before the highlight in the reading direction is hidden by its background.From what I can see in the source, it seems pretty easy to add, but I can't think of a good name for the prop.
What do you think? Thanks!