Commit 9ac11f1d by Torkel Ödegaard

updated add panel a bit

parent 9d8d5b18
...@@ -203,25 +203,27 @@ export class AddPanelPanel extends React.Component<AddPanelPanelProps, AddPanelP ...@@ -203,25 +203,27 @@ export class AddPanelPanel extends React.Component<AddPanelPanelProps, AddPanelP
return ( return (
<div className="panel-container add-panel-container"> <div className="panel-container add-panel-container">
<div className="add-panel"> <div className="add-panel">
<div className="add-panel__header"> <div className="add-panel__header grid-drag-handle">
<i className="gicon gicon-add-panel" /> <i className="gicon gicon-add-panel" />
<button className="add-panel__close" onClick={this.handleCloseAddPanel}> <button className="add-panel__close" onClick={this.handleCloseAddPanel}>
<i className="fa fa-close" /> <i className="fa fa-close" />
</button> </button>
</div> </div>
<div className="add-panel-btn-container"> <div className="add-panel-btn-container">
<div className="gf-form-button-row"> <button
<button className="btn-success btn" onClick={() => this.onCreateNewPanel(panel)} title={panel.name}> className="btn-success btn btn-large"
Create new Panel onClick={() => this.onCreateNewPanel(panel)}
title={panel.name}
>
Edit Panel
</button> </button>
{addCopyButton} {addCopyButton}
<button className="btn-inverse btn" onClick={() => this.onCreateNewRow(row)} title={row.name}> <button className="btn-inverse btn" onClick={() => this.onCreateNewRow(row)} title={row.name}>
Add new Row Add Row
</button> </button>
</div> </div>
</div> </div>
</div> </div>
</div>
); );
} }
} }
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
.add-panel { .add-panel {
height: 100%; height: 100%;
//display: flex;
//flex-direction: column;
} }
.add-panel__header { .add-panel__header {
...@@ -15,10 +13,17 @@ ...@@ -15,10 +13,17 @@
display: flex; display: flex;
align-items: center; align-items: center;
width: 100%; width: 100%;
cursor: move;
.gicon { .gicon {
font-size: 30px; font-size: 30px;
margin-right: $spacer; margin-right: $spacer;
} }
&:hover {
transition: background-color 0.1s ease-in-out;
background-color: $panel-header-hover-bg;
}
} }
.add-panel__close { .add-panel__close {
...@@ -29,63 +34,14 @@ ...@@ -29,63 +34,14 @@
margin-right: -10px; margin-right: -10px;
} }
.add-panel__items {
padding: 3px 8px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
overflow: auto;
height: 100%;
align-content: flex-start;
justify-content: space-around;
position: relative;
}
.add-panel__item {
background: $card-background;
box-shadow: $card-shadow;
border-radius: 3px;
padding: $spacer/3 $spacer;
width: 31%;
height: 60px;
text-align: center;
margin: $gf-form-margin;
cursor: pointer;
&.active,
&:hover {
background: $card-background-hover;
}
}
.add-panel__item-name {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
font-size: $font-size-sm;
}
.add-panel__item-img {
height: calc(100% - 15px);
}
.add-panel__searchbar {
width: 100%;
margin-bottom: 10px;
margin-top: 7px;
}
.add-panel__no-panels {
color: $text-color-weak;
font-style: italic;
width: 100%;
padding: 3px 8px;
}
.add-panel-btn-container { .add-panel-btn-container {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
height: 100%; height: 100%;
flex-direction: column;
.btn {
margin-bottom: 10px;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment