2.0.1 • Published 7 years ago

react-overflow-tooltip v2.0.1

Weekly downloads
4,655
License
ISC
Repository
github
Last release
7 years ago

react-overflow-tooltip

npm travis

A React component that shows a tooltip only if the text is overflow.

var ReactOverflowTooltip = require('react-overflow-tooltip')

<ReactOverflowTooltip title='too long text'>
  <div>too long text</div>
</ReactOverflowTooltip>
// => <div title="too long text...">too long text...</div>

<ReactOverflowTooltip title='short text'>
  <div>{ text }</div>
</ReactOverflowTooltip>
// => <div>too long text...</div>

Install

npm install react-overflow-tooltip

License

ISC