zerone2 / react-ellipsis-with-tooltip

truncates (with ellipsis) overflowing text elements and adds a tooltip https://amirfefer.github.io/react-ellipsis-with-tooltip

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-ellipsis-with-tooltip

truncates (with ellipsis) overflowing text elements and adds a tooltip https://amirfefer.github.io/react-ellipsis-with-tooltip

Package Version semantic-release Downloads Status Build Status: Linux Coverage Status PRs Welcome dependencies Status devDependencies Status code style: prettier MIT License

Recognizes whether a text element is overflowed, truncates (with ellipsis) it and adds bootstrap's tooltip. Try via stroybook

Installation

npm install --save react-ellipsis-with-tooltip

or

yarn add react-ellipsis-with-tooltip

Usage

Table cell

import EllipsisWithTooltip from 'react-ellipsis-with-tooltip'

<td>
  <EllipsisWithTooltip placement="bottom">
     Lorem Ipsum
  </EllipsisWithTooltip>
<td>   

Anchor element

import EllipsisWithTooltip from 'react-ellipsis-with-tooltip'

<td>
  <EllipsisWithTooltip placement="bottom">
    <a href="#">  Lorem Ipsum </a> 
  </EllipsisWithTooltip>
<td> 

License

MIT © Amir Fefer

About

truncates (with ellipsis) overflowing text elements and adds a tooltip https://amirfefer.github.io/react-ellipsis-with-tooltip

License:MIT License


Languages

Language:JavaScript 95.7%Language:HTML 4.3%