stephane-monnot / react-vertical-timeline

Vertical timeline for React.js
https://stephane-monnot.github.io/react-vertical-timeline/
MIT License
1.08k stars 158 forks source link

OnClick event for clicking timeline bar #76

Closed DevNM21-zz closed 4 years ago

DevNM21-zz commented 4 years ago

I was thinking of adding this feature where you can click on the timeline bar, which is in the exact center of the Timeline component, and it'd return certain values like, where was the click happened, or near what TimelineElement. I have an use case for this at work, like, you click on the timeline bar, and you should be able to add an event in between the timestamp of the other two TimelineElements. I hope I am clear of my needs. It'd be useful if I could get a pointer or two on how I'd modify the source code to achieve this. I'll also create a pull-request so you can include it in the package officially (that is, if you like it and think it is good) Thanks!