Eliav2 / react-xarrows

Draw arrows (or lines) between components in React!
https://codesandbox.io/embed/github/Eliav2/react-xarrows/tree/master/examples?fontsize=14&hidenavigation=1&theme=dark
MIT License
584 stars 75 forks source link

How to change arrow color on hover #114

Open flashnt opened 2 years ago

flashnt commented 2 years ago

Can I ask how I can change the arrow color and more customization (such as displaying label) on hover? Thank you for your great API!

joealden commented 2 years ago

@flashnt this would probably be better as a discussion: https://github.com/Eliav2/react-xarrows/discussions

JiProchazka commented 11 months ago

Here you go:

const [color, setColor] = useState('#999999');

return (
  <Xarrow
      color={color}
      passProps={{ onMouseOver: () => setColor('#333333'), onMouseOut: () => setColor('#999999') }}
  />
);