Skip to content

How override selected row styles? #35

Answered by rwieruch
bezvrednyy asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @bezvrednyy Thanks for asking:

If you want to give a row a specific CSS class, do it this way:

<Row className="foo" ... >

Then if you want to style all Row components with this CSS class, specify it in the THEME that is passed to const = useTheme(THEME):

const THEME = {
  Row: `
    &.foo {
      background-color: pink;
    }
  `
};

Regarding the selected state on a row, when you inspect the HTML elements in the browser, you will see that the Row component receives the following optional* CSS classes based on its select status:

row-select-selected
row-select-single-selected

While the former is applied for multi-select, the latter gets applied for single select. So if you want to sty…

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@rwieruch
Comment options

@bezvrednyy
Comment options

@rwieruch
Comment options

@bezvrednyy
Comment options

@rwieruch
Comment options

Answer selected by bezvrednyy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants