react-xarrows icon indicating copy to clipboard operation
react-xarrows copied to clipboard

How to change arrow color on hover

Open flashnt opened this issue 4 years ago • 2 comments

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!

flashnt avatar Jan 20 '22 02:01 flashnt

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

joealden avatar Feb 04 '22 12:02 joealden

Here you go:

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

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

JiProchazka avatar Nov 23 '23 13:11 JiProchazka