ShinyChang/React-Text-Truncate

Allow Node for `text` prop

iowillhoit opened this issue · 3 comments

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}
    />
);

Looking to find out how to do this too.

�Will looking for solution :)

Fixed in v0.12.0