-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Lens] Consistent Drag and Drop styles (#78674)
* Remove wrapping div of DragDrop and pass props to child * Using EuiHighlight * Basic styles in for all DnD states * Fixing dimension button styles * Fix FieldButton to accept `…rest` props * A few other minor fixes * Fixed horizontal scroll of error message * Quick fix for invalid link
- Loading branch information
Showing
21 changed files
with
431 additions
and
293 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 9 additions & 9 deletions
18
x-pack/plugins/lens/public/drag_drop/__snapshots__/drag_drop.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,54 @@ | ||
.lnsDragDrop-isNotDroppable { | ||
opacity: .5; | ||
@import '../variables'; | ||
@import '../mixins'; | ||
|
||
.lnsDragDrop { | ||
transition: background-color $euiAnimSpeedFast ease-in-out, border-color $euiAnimSpeedFast ease-in-out; | ||
} | ||
|
||
// Draggable item | ||
.lnsDragDrop-isDraggable { | ||
@include lnsDraggable; | ||
@include lnsDragDropHover; | ||
|
||
// Include a possible nested button like when using FieldButton | ||
> .kbnFieldButton__button { | ||
cursor: grab; | ||
} | ||
|
||
&:focus { | ||
@include euiFocusRing; | ||
} | ||
} | ||
|
||
// Draggable item when it is moving | ||
.lnsDragDrop-isHidden { | ||
opacity: 0; | ||
} | ||
|
||
// Drop area | ||
.lnsDragDrop-isDroppable { | ||
@include lnsDroppable; | ||
} | ||
|
||
// Fix specificity by chaining classes | ||
// Drop area when there's an item being dragged | ||
.lnsDragDrop-isDropTarget { | ||
@include lnsDroppableActive; | ||
} | ||
|
||
.lnsDragDrop.lnsDragDrop-isDropTarget { | ||
background-color: transparentize($euiColorSecondary, .9); | ||
// Drop area while hovering with item | ||
.lnsDragDrop-isActiveDropTarget { | ||
@include lnsDroppableActiveHover; | ||
} | ||
|
||
// Drop area that is not allowed for current item | ||
.lnsDragDrop-isNotDroppable { | ||
@include lnsDroppableNotAllowed; | ||
} | ||
|
||
.lnsDragDrop.lnsDragDrop-isActiveDropTarget { | ||
background-color: transparentize($euiColorSecondary, .75); | ||
// Drop area will be replacing existing content | ||
.lnsDragDrop-isReplacing { | ||
&, | ||
.lnsLayerPanel__triggerLink { | ||
text-decoration: line-through; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.