mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-04 18:51:17 +00:00
Refactored mixins into utils ES2015 module exports ES2015-style imports WIP Fixing tests Fixes tests after es2015 code migrations. We we're require()ing an ES2015 module[1]. Have to make sure you account for the .default in this case. [1] We had to use ES5 `require` in Jest: (https://github.com/babel/babel-jest/issues/16)
34 lines
932 B
JavaScript
34 lines
932 B
JavaScript
import React from 'react';
|
|
|
|
import { clickCloseDetails } from '../actions/app-actions';
|
|
import NodeDetails from './node-details';
|
|
|
|
export default class Details extends React.Component {
|
|
constructor(props, context) {
|
|
super(props, context);
|
|
this.handleClickClose = this.handleClickClose.bind(this);
|
|
}
|
|
|
|
handleClickClose(ev) {
|
|
ev.preventDefault();
|
|
clickCloseDetails();
|
|
}
|
|
|
|
render() {
|
|
return (
|
|
<div id="details">
|
|
<div style={{height: '100%', paddingBottom: 8, borderRadius: 2,
|
|
backgroundColor: '#fff',
|
|
boxShadow: '0 10px 30px rgba(0, 0, 0, 0.19), 0 6px 10px rgba(0, 0, 0, 0.23)'}}>
|
|
<div className="details-tools-wrapper">
|
|
<div className="details-tools">
|
|
<span className="fa fa-close" onClick={this.handleClickClose} />
|
|
</div>
|
|
</div>
|
|
<NodeDetails {...this.props} />
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
}
|