title: Is it possible to set a className on custom react components?
body: <p>Let's say I have a simple component like this:</p>
  
  <pre><code>class SimpleComponent extends React.Component
  {
      render() { return &lt;p&gt;Some text&lt;/p&gt; }
  }
  </code></pre>
  
  <p>Is it possible to add a <code>className</code> to <code>SimpleComponent</code> or is this constrained to HTML DOM elements only?</p>
  
  <p>For example:</p>
  
  <pre><code>var mySimpleComponent = &lt;SimpleComponent className="myComp"/&gt;
  </code></pre>
  
  <p>The reason I would like to do this is so that I can style the elements inside my custom component like this:</p>
  
  <pre><code>.myComp &gt; p {
      background-color: blue;
  }
  </code></pre>