How would I dynamically change the top padding of each element in this timeline?

I need to dynamically add padding to each element in this track so they dont overlap. I am using the node module called react-timelines in ReactJS This is how it looks at the moment (image) and this is how I want it to look like (image 2) I have tried looking at the SCSS but I can't seem to figure out how to dynamically add it to each element.