Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider supporting onMouseOver/Out #30

Closed
nkkollaw opened this issue Aug 27, 2018 · 2 comments
Closed

Consider supporting onMouseOver/Out #30

nkkollaw opened this issue Aug 27, 2018 · 2 comments

Comments

@nkkollaw
Copy link

nkkollaw commented Aug 27, 2018

I had a use case (nav) where I eventually wrapped <LI>s with <DIV>s just to get onMouseOver/Out.

Would it make sense for react-animate-on-change to pass these events (perhaps onClick as well?)

It would have been great if I could have done:

        <AnimateOnChange
          customTag="li"
          baseClassName="nav-item"
          animationClassName="animated bounce"
          animate={this.state.hover}
          onMouseOver={this.handleMouseOver} 
          onMouseOut={this.handleMouseOut}
        >
          <Link className={'nav-link' + (Boolean(this.props.active) ? ' active' : '')} to={this.props.to}>{this.props.children}</Link>
        </AnimateOnChange>

instead of:

      <div style={{display: 'inline'}} onMouseOver={this.handleMouseOver} onMouseOut={this.handleMouseOut}>
        <AnimateOnChange
          customTag="li"
          baseClassName="nav-item"
          animationClassName="animated bounce"
          animate={this.state.hover}
        >
          <Link className={'nav-link' + (Boolean(this.props.active) ? ' active' : '')} to={this.props.to}>{this.props.children}</Link>
        </AnimateOnChange>
      </div>
@INQTR
Copy link

INQTR commented May 14, 2019

Hi, I created a pool request #31 that would be able to forward custom props

@arve0
Copy link
Owner

arve0 commented May 26, 2019

Fixed in #31, released in v2.2.0.

@arve0 arve0 closed this as completed May 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants