nerdchacha / react-hoverintent

MIT License
13 stars 6 forks source link

Inline styles placed on container #3

Closed ghost closed 7 years ago

ghost commented 7 years ago

I wanted to use react-hoverintent in a project I'm working on, but I noticed that <HoverIntent/> automatically places an inline style of width:100%;height:100%;display:inline-block on the element. Is there a way to override this? In my circumstance, the <button/> I'm wrapping doesn't need an explicit width or height set.

This ...

<HoverIntent
      onMouseOver={this.onMouseOver}
      onMouseOut={this.onMouseOut}
      sensitivity={10}
      interval={1000}
      timeout={250}>
        <button>Hover</button>
    </HoverIntent>

Becomes ...

<div style="display: inline-block; width: 100%; height: 100%;">
       <button>Hover</button>        
</div>
nerdchacha commented 7 years ago

@nbcnc I have pushed a patch with v0.0.9. Hopefully that should solve the issue. Feel free to get back in case that doesn't work.

Cheers and thanks for flagging this.

nerdchacha commented 7 years ago

@nbcnc if the patch resolved your issue, can this be closed?