react-auto-height-transition

0.1.3 • Public • Published

react-auto-height-transition

基于react的可自动过渡高度的transition组件

使用方法:

import {
    TransitionWhenToggle,
    TransitionWhenHeightChange
} from 'react-auto-height-transition'
 
<TransitionWhenToggle duration={300} timeFunction={'ease'}>
  {
    this.state.show && (
      <div>
        placeholder<br/>
        placeholder<br/>
        placeholder<br/>
        placeholder<br/>
      </div>
    )
  }
</TransitionWhenToggle>
 
<TransitionWhenHeightChange height={this.state.shouldCollapsed ? 20 : null} duration={300} timeFunction={'ease'}>
    <div>
        placeholder<br/>
        placeholder<br/>
        placeholder<br/>
        placeholder<br/>
      </div>
</TransitionWhenHeightChange>
 

Readme

Keywords

Package Sidebar

Install

npm i react-auto-height-transition

Weekly Downloads

4

Version

0.1.3

License

MIT

Unpacked Size

480 kB

Total Files

15

Last publish

Collaborators

  • liz2z