0

How to add color to the html 5 <td> data?

for eg:

<td>{ this.props.item.status }</td> 

Here I have to highlight status with some color.

Could anyone help me out on this?

Amruth
  • 5,792
  • 2
  • 28
  • 41
Karthikeyan
  • 1,927
  • 6
  • 44
  • 109

1 Answers1

0

You can use style tag in order to add style to your element:

    let tdStyle = {
        color: 'white',
    }
    <td style={tdStyle}>{ this.props.item.status }</td>

You can check official documentation here.

Vitiok
  • 84
  • 7