react-data-grid icon indicating copy to clipboard operation
react-data-grid copied to clipboard

tailwindcss style

Open vlknhslk opened this issue 4 years ago • 1 comments

What is the best way to style a table using tailwindcss with React/JS?

vlknhslk avatar Oct 18 '21 03:10 vlknhslk

You can modify the default table styles by adding them to your tailwind CSS. E.g., if you add this to your tailwind .css file (either for the table component or global): .rdg-cell { @apply bg-green-400; } It will make every cell in the table green.

But if you do: .rdg-header-sort-cell { @apply bg-green-400; } Then, only the header cells (assuming they are sort-cells) will have a green background. You should be able to figure out the rest from there.

Chrysippus avatar Dec 17 '21 23:12 Chrysippus