ux: minor fixes

This commit is contained in:
Torkel Ödegaard
2017-10-13 17:01:38 +02:00
parent 0c31d23086
commit 825cac38b4
4 changed files with 45 additions and 35 deletions

View File

@@ -31,6 +31,8 @@ export class DashboardPanel extends React.Component<DashboardPanelProps, any> {
}
}
render() {
return (
<div ref={element => this.element = element} />

View File

@@ -0,0 +1,42 @@
import React from 'react';
import {PanelModel} from '../panel_model';
export interface DashboardRowProps {
panel: PanelModel;
}
export class DashboardPanel extends React.Component<DashboardRowProps, any> {
constructor(props) {
super(props);
this.toggle = this.toggle.bind(this);
this.openSettings = this.openSettings.bind(this);
}
toggle() {}
openSettings() {}
render() {
return (
<div>
<div className="dashboard-row__center">
<div className="dashboard-row__actions-left">
<i className="fa fa-chevron-down" />
<i className="fa fa-chevron-right" />
</div>
<a className="dashboard-row__title pointer" onClick={this.toggle}>
<span className="dashboard-row__title-text">{this.props.panel.title}</span>
</a>
<div className="dashboard-row__actions-right">
<a className="pointer" onClick={this.openSettings}>
<i className="fa fa-cog" />
</a>
</div>
</div>
<div className="dashboard-row__panel_count">(0 hidden panels)</div>
<div className="dashboard-row__drag grid-drag-handle" />
</div>
);
}
}