title: Reactjs - Passing Color as Prop
body: <p>I'm trying to use a color as a prop in a reactjs setting.  In the General_heading component, I want to be able to pass a prop to define the color of the heading, but I can't get it to respond currently.  Thoughts?
  in app.js:</p>
  
  <pre><code>&lt;div&gt;&lt;General_header theme_color="red"/&gt;&lt;/div&gt;
  </code></pre>
  
  <p>in General_header.js:</p>
  
  <pre><code>import React, { Component } from 'react';
  
  class General_header extends React.Component {
    constructor(props) {
      super(props);
      this.state = {logo_img: props.logo_img,
                    theme_color: props.theme_color};
    }
  
    render() {
      return (
        &lt;div style={[styles.header,{backgroundColor:this.state.theme_color}]}&gt;test
          &lt;img src={this.state.logo_img} alt={'logo'} style={styles.logo_img} /&gt;
        &lt;/div&gt;
      );
    }
  }
  
  var styles = {
    header: {
      height: '100px',
      display: 'block'},
    logo_img: {
      height: '40px',
      display: 'inline-block'}
  
  }
  
  export default General_header;
  </code></pre>