kdeloach / react-lineto

Draw a line between two elements in React
MIT License
234 stars 63 forks source link

Forward props to underlying div element #52

Open TomPlum opened 3 years ago

TomPlum commented 3 years ago

I'm wanting to test that a line is drawn under a given scenario with React Testing Library and it seems "data-testid" is the only attribute I could use to select it. However, passing one to the <LineTo /> component doesn't seem to make it to the DOM.

It would be nice if we could forward and spread any additional props passed in to the underlying <div /> element that is the line.