react-liner
v1.2.0
Published
A component for highlighting parts of paragraphs
Downloads
4
Readme
react-liner
Highlight a text. Get its content:
{
preffix: 'High',
exact: 'light a text',
suffix: '. Get its content:'
}
With react.
import Liner from 'react-liner'
function callback({prefix, suffix, exact}) {
console.log('prefix', prefix)
console.log('exact', exact)
console.log('suffix', suffix)
}
<Liner onSelect={callback}>This is a Highlightable-Text</Liner>
Roadmap
- [X] Children is a plain text
- [] Children has nested elements