Skip to content

react-hover 1.0.0 release

Compare
Choose a tag to compare
@cht8687 cht8687 released this 03 May 14:06
· 134 commits to master since this release

Breaking changes:
API has changed to make this lib easier to use:

You can now turn plain HTML or your custom trigger/hover components in React-hover.

Below is the example of custom components:

<ReactHover
  options={optionsCursorTrueWithMargin}>
  <ReactHover.Trigger>
    <TriggerComponent />
  </ReactHover.Trigger>
  <ReactHover.Hover>
    <HoverComponent />
  </ReactHover.Hover>
</ReactHover>

Or plain HTML element:

<ReactHover
  options={optionsCursorTrueWithMargin}>
  <ReactHover.Trigger>
    <h1 style={{background: '#abbcf1', width: '200px'}}> Hover on me </h1>
  </ReactHover.Trigger>
  <ReactHover.Hover>
    <h1> I am hover HTML </h1>
  </ReactHover.Hover>
</ReactHover>