dmk99 / react-pdf-table

Storybook Available
https://dmk99.github.io/react-pdf-table
MIT License
152 stars 62 forks source link

styling rows #37

Closed leandrovegacr closed 2 years ago

leandrovegacr commented 3 years ago

Hi, thanks for your work.

I've been fiddling with the library today, and was trying to zebra-color rows in my table, but I've not found how to do it... I use DataTableCells to display info, and even if I can style each row, I can't seem to find a way to style it depending if it is even or odd.

I was thinking it could be useful the DataTableCell component can have access to each row not only to get content to display, but to get the styling also, which would make the styling more powerful. Don't know if you have came accross something like this, and if you have thought about a way to solve it.

Thanks again, I could also try to help with this, if the project is accepting collaborations.

I paste a sample of what I need:

image

joao-fb commented 3 years ago

I would love hear about this as well!

dmk99 commented 2 years ago

Great idea. This will be something to explore.

nathanpdaniel commented 2 years ago

I created #42 to enable this.

dmk99 commented 2 years ago

Merged in #42 by @nathanpdaniel. Version 0.4.0 will have this functionality.