All files / javascripts/dashboard/components Header.jsx

0% Statements 0/10
0% Branches 0/4
0% Functions 0/1
0% Lines 0/10
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41                                                                                 
import React from 'react';
 
import Controls from './Controls';
 
const propTypes = {
  dashboard: React.PropTypes.object,
};
const defaultProps = {
};
 
class Header extends React.PureComponent {
  constructor(props) {
    super(props);
    this.state = {
    };
  }
  render() {
    const dashboard = this.props.dashboard;
    return (
      <div className="title">
        <div className="pull-left">
          <h1>
            {dashboard.dashboard_title} &nbsp;
            <span is class="favstar" class_name="Dashboard" obj_id={dashboard.id} />
          </h1>
        </div>
        <div className="pull-right">
        {!this.props.dashboard.context.standalone_mode &&
          <Controls dashboard={dashboard} />
        }
        </div>
        <div className="clearfix" />
      </div>
    );
  }
}
Header.propTypes = propTypes;
Header.defaultProps = defaultProps;
 
export default Header;