Skip to content

uiur/react-overflow-tooltip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published