gilbarbara / react-floater

Advanced tooltips for React
https://codesandbox.io/s/github/gilbarbara/react-floater/tree/main/demo
MIT License
220 stars 37 forks source link

Tooltip with hover on react components doesn't work (v0.8.0) #86

Closed romanlex closed 2 years ago

romanlex commented 2 years ago

🐛 Bug Report

Hover on react components doesn't work on v0.8.0

To Reproduce

example https://199i5t.csb.app/ file WithHoverAndNoDelay

gilbarbara commented 2 years ago

hey @romanlex

Check the Customization section in the README. You'll need to set the ref in your component.

In the codesandbox that you sent, instead of destructuring the children from props, just spread the whole props in the element.

const Button = (props: { children: React.ReactNode }) => {
  return <button type="button" {...props} />;
};