title: How pass React prop to CSS
body: <p>I have a problem - I don't know how to change checkbox color using a color value from props. My idea was to give it via style attribute but I don't know how to toggle this. I'm using <a href="https://www.npmjs.com/package/rc-switch" rel="nofollow noreferrer">rc-switch</a> and I want to change his background depending on Switch state. I have something like this now</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;Switch style={{ backgroundColor: mainColor }}/&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>but it set this color for both states and I want this swich to become 'defaultColor' when is in off position.</p>