1.0.2 • Published 5 years ago

auto-height-transition v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

auto-height-transition

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

使用方法:

import {
    TransitionWhenHeightChange,
    TransitionWhenToggle
} from '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>