Skip to content

Commit

Permalink
Add x to close details panel again
Browse files Browse the repository at this point in the history
Fixes #667
  • Loading branch information
davkal committed Nov 13, 2015
1 parent 80b9adf commit c0e7ade
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
11 changes: 11 additions & 0 deletions client/app/scripts/components/details.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
const React = require('react');

const AppActions = require('../actions/app-actions');
const NodeDetails = require('./node-details');

const Details = React.createClass({

handleClickClose: function(ev) {
ev.preventDefault();
AppActions.clickCloseDetails();
},

render: function() {
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>
Expand Down
29 changes: 28 additions & 1 deletion client/app/styles/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,33 @@ h2 {
top: 24px;
bottom: 48px;
width: 420px;

.details-tools-wrapper {
position: relative;
}

.details-tools {
position: absolute;
top: 16px;
right: 24px;

span {
.palable;
padding: 4px;
margin-left: 2px;
font-size: 110%;
color: @white;
cursor: pointer;
opacity: 0.7;
border: 1px solid rgba(255, 255, 255, 0);
border-radius: 10%;

&:hover {
opacity: 1;
border-color: rgba(255, 255, 255, 0.6);
}
}
}
}

.node-details {
Expand All @@ -327,7 +354,7 @@ h2 {

&-header {

padding: 24px 36px 16px 36px;
padding: 36px 36px 16px 36px;

&-row {
display: flex;
Expand Down

0 comments on commit c0e7ade

Please sign in to comment.