1.2.0 • Published 8 years ago

react-liner v1.2.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

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

  • Children is a plain text
  • [] Children has nested elements