Define striped color in react-data-table-component

4k Views Asked by At

I have a 'react-data-table-component' and I want to basically make a dark theme. I have managed to change the background color but I also want my striped background color to be dark as well.

Here is the code:

createTheme('solarized', {
  text: {
    primary: 'white',
  },
  background: {
    default: '#131313',
  },
})

The rows go dark(#131313), white, dark, white. I don't know and can't find the striped style color.

Thanks

1

There are 1 best solutions below

0
Jake On

Refer to the documentation for react-data-table-component. It refers you to the themes.js file, where you can define the striped colour on line 37.

Solution:

createTheme('solarized', {
  text: {
    primary: 'white',
  },
  background: {
    default: '#131313',
  },
  striped: {
    default: // ENTER YOU NEW COLOR HERE
  },
})