Drag handles on environment sidebar (Closes #982)

This commit is contained in:
Gregory Schier 2018-06-08 23:18:40 -04:00
parent 6519274a9d
commit 1e72f5270a
3 changed files with 19 additions and 0 deletions

View File

@ -51,6 +51,7 @@ const SidebarListItem = SortableElement(({environment, activeEnvironment, showEn
return (
<li key={environment._id} className={classes}>
<Button onClick={showEnvironment} value={environment}>
<i className="fa fa-drag-handle drag-handle"/>
{environment.color
? <i className="space-right fa fa-circle" style={{color: environment.color}}/>
: <i className="space-right fa fa-empty"/>

View File

@ -91,6 +91,14 @@
padding-right: 0;
}
position: relative;
.drag-handle {
position: absolute;
left: 0;
opacity: 0;
color: var(--hl-lg)
}
.editable {
white-space: nowrap;
overflow: hidden;
@ -112,6 +120,11 @@
&:hover > button {
background-color: @hl-xs;
}
&.env-modal__sidebar-item--dragging .drag-handle,
&:hover .drag-handle {
opacity: 1;
}
}
.env-modal__sidebar-item {

View File

@ -645,6 +645,11 @@ i.fa:not(.fa--skinny) {
}
}
.fa-drag-handle:before {
content: "\f142\f142";
letter-spacing: 0.1em;
}
.bold,
strong {
font-weight: 600;