title: Change color on conditions in table map in reactjs
body: <p>I want to change the color of td entry in my table. As if current balance is less than 100, red color should be red. if current balance is between 100 and 200, current balance color turns yellow , otherwise current balance column color should be green.
  The values are hardcoded, if i change values, colors should be changed accordingly.</p>
  <p>Here is my code:</p>
  <pre><code>import React from 'react';
  import * as Icon from 'react-feather';
  import PropTypes from &quot;prop-types&quot;;
  import { Link } from &quot;react-router-dom&quot;;
  import { Dropdown, Table, Badge } from 'react-bootstrap';
  
  class ChurnCustomer extends React.Component {
      constructor(props) {
          super(props);
          this.state =
          {
              title: &quot;New Users&quot;,
              users: [
                  {
                      id: 1,
                      name: &quot;Addison Mary&quot;,
                      email: &quot;amary@GrammarList.com&quot;,
                      phoneNo: '724313577059',
                      CurrentBalance: 356
                  },
                  {
                      id: 2,
                      name: &quot;Rosemary Joe&quot;,
                      email: &quot;rosemary.joe@gmail.com&quot;,
                      phoneNo: '003135770259',
                      CurrentBalance: 125,
                  },
                  {
                      id: 3,
                      name: &quot;Scarlett Skyler&quot;,
                      email: &quot;sskyler@gmail.com&quot;,
                      phoneNo: '933135770134',
                      CurrentBalance: 49
                  },
                  {
                      id: 4,
                      name: &quot;Victoria B.&quot;,
                      email: &quot;victoriaBgmail.com&quot;,
                      phoneNo: '003357577009',
                      CurrentBalance: 195
                  },
                  {
                      id: 5,
                      name: &quot;Philip&quot;,
                      email: &quot;philip@gmail.com&quot;,
                      phoneNo: '005613570459',
                      CurrentBalance: 249
                  },
                  {
                      id: 6,
                      name: &quot;Zoe Nelms&quot;,
                      email: &quot;zoe@gmail.com&quot;,
                      phoneNo: '923135770459',
                      CurrentBalance: 99
                  }
              ]
          }
      }
      render() {
          const { users } = this.state;
          return (
              &lt;div className='Customer-tables-div'&gt;
                  &lt;div className=&quot;card mb-4&quot;&gt;
                      &lt;div className=&quot;card-body&quot;&gt;
                          &lt;div className=&quot;card-header d-flex&quot;&gt;
                              &lt;h5 className=&quot;card-title w-50 float-left&quot;&gt;Churn Customer&lt;/h5&gt;
  
                          &lt;/div&gt;
  
                          &lt;div className=&quot;height-310&quot;&gt;
                              &lt;Table className=&quot;m-0&quot; responsive&gt;
                                  &lt;thead&gt;
                                      &lt;tr&gt;
                                          &lt;th&gt;Customer Name&lt;/th&gt;
                                          &lt;th&gt;Email&lt;/th&gt;
                                          &lt;th&gt;Phone No.&lt;/th&gt;
                                          &lt;th&gt;Current Balance&lt;/th&gt;
                                      &lt;/tr&gt;
                                  &lt;/thead&gt;
  
                                  &lt;tbody&gt;
                                      {users.map((user, idx) =&gt; (
                                          &lt;tr key={idx}&gt;
                                              &lt;td&gt;{user.name}&lt;/td&gt;
                                              &lt;td&gt;{user.email}&lt;/td&gt;
                                              &lt;td&gt;{user.phoneNo}&lt;/td&gt;
                                              &lt;td&gt;
                                                  {user.CurrentBalance}
                                              &lt;/td&gt;
  
                                          &lt;/tr&gt;
                                      ))}
                                  &lt;/tbody&gt;
                              &lt;/Table&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          );
      }
  }
  
  export default ChurnCustomer;
  </code></pre>
  <p><a href="https://i.stack.imgur.com/Hu2hu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hu2hu.png" alt="enter image description here" /></a></p>
  <p>I want to change the color of Current Balance according to the conditions mentioned above.</p>