xiaody / react-lines-ellipsis

Simple multiline ellipsis component for React.JS

Home Page:https://xiaody.github.io/react-lines-ellipsis/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Module is not supporting style animation.

madhav-b opened this issue · comments

I had tried to apply style animation with react-line-ellipsis module but can't get any working solution. Transition element is not supporting with this module, Please let me know anyone who faced this issue and resolved.

Here is my code:

**index.tsx**
<div>
  <h6>{title}</h6>
  <LinesEllipsis
    text={description}
    maxLine={this.state.maxLine}
    ellipsis='...'
    basedOn='letters'
    />  
  <a onClick={this.handleClick}>{this.state.toggle ? "less" : "more" }</a>
</div>


**styles.css**

.LinesEllipsis--clamped {
    transition: all ease-out .2s;
}

As far as I can tell, there is no easy way to do animations for this component. A hidden element must be used and manual style calculation is necessary, which is quite dirty.