react-clamp-lines
react-clamp-lines copied to clipboard
Support customization of overflow element
Hello there,
I am looking for a way to pass in any react element in place of the overflow text. My use case is as follows
Given that a developer is using react-clamp-lines component
The developer should be able to pass int a custom prop `overFlowElement` that allows them to substitute the more / less text with any react element
In my case, I'd like to be able to substitute it with a link that says, "Continue reading .." and it should allow me to link from the text to a different page in my application. I don't believe this feature is currently supported by react-clamp-lines, does anyone have any suggestions for workarounds in the meantime? For reference, shittake has support for this feature and they call it overflowNode.
Thank you
@codepath2019 The easiest workaround would be:
- Set
buttons={false}to hide them - Create the
Continue reading..link below the component that points to a different page.