Allow Node for `text` prop
iowillhoit opened this issue · 3 comments
iowillhoit commented
I have a Highlighter component that highlights substrings based off of a search
prop. It would be great if I could pass my Highlighter component to your text
prop so that the string could be both truncated and highlighted.
Example:
const desc = <Highlighter search={this.props.search}>{this.props.description}</Highlighter>;
return (
<Truncate
line={2}
truncateText="…"
text={desc}
/>
);
francisngo commented
Looking to find out how to do this too.
ShinyChang commented
�Will looking for solution :)
ShinyChang commented
Fixed in v0.12.0