'change the background color of the Table Row

How can I change the background color of the Table Row, I tried using "BackgroundColor" but it didn't change

How can i solve the problem?

     <TableRow style={{ backgroundColor: "#FF0000" }}>
        <TableCell>
          <Button>All</Button>
        </TableCell>
      </TableRow>


Solution 1:[1]

try: background-color instead of backgroundColor

Never used react before, thats just the traditional css way.

Solution 2:[2]

Your code should work fine. See below for a working example with your exact same attempt:

enter image description here

You can find the codesandbox reproduction here. You can also look into the sx prop when working with MUI components.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jack Lankford
Solution 2 pez