react-overflow-tooltip
v2.0.1
Published
A React component that shows a tooltip only if the text is overflow
Downloads
14,059
Readme
react-overflow-tooltip
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