Files
superset2/superset/assets/javascripts/dashboard/components/Header.jsx
Maxime Beauchemin 366ecefbaa Bumping the JS libs to fix the build (#2616)
* bumping the js libs

* New linting rules

* More linting

* More

* Done linting

* npm >=4.5.0

* Bumping node

* Tweaking the build

* Fixing the damn build

* Fixing the apps
2017-04-13 15:04:09 -07:00

41 lines
921 B
JavaScript

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" style={{ marginTop: '35px' }}>
{!this.props.dashboard.standalone_mode &&
<Controls dashboard={dashboard} />
}
</div>
<div className="clearfix" />
</div>
);
}
}
Header.propTypes = propTypes;
Header.defaultProps = defaultProps;
export default Header;