react-xarrows
react-xarrows copied to clipboard
How to change arrow color on hover
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 this would probably be better as a discussion: https://github.com/Eliav2/react-xarrows/discussions
Here you go:
const [color, setColor] = useState('#999999');
return (
<Xarrow
color={color}
passProps={{ onMouseOver: () => setColor('#333333'), onMouseOut: () => setColor('#999999') }}
/>
);