component ndentation
This commit is contained in:
parent
a34390c986
commit
e6a712f880
|
@ -21,6 +21,7 @@
|
|||
export let id
|
||||
export let showTooltip = false
|
||||
export let selectedBy = null
|
||||
export let compact = false
|
||||
|
||||
const scrollApi = getContext("scroll")
|
||||
const dispatch = createEventDispatcher()
|
||||
|
@ -80,8 +81,9 @@
|
|||
{#if withArrow}
|
||||
<div
|
||||
class:opened
|
||||
class:relative={indentLevel === 0}
|
||||
class:absolute={indentLevel > 0}
|
||||
class:relative={indentLevel === 0 && !compact}
|
||||
class:absolute={indentLevel > 0 && !compact}
|
||||
class:compact
|
||||
class="icon arrow"
|
||||
on:click={onIconClick}
|
||||
>
|
||||
|
@ -194,6 +196,13 @@
|
|||
padding: 8px;
|
||||
margin-left: -8px;
|
||||
}
|
||||
|
||||
.compact {
|
||||
position: absolute;
|
||||
left: 4px;
|
||||
padding: 8px;
|
||||
margin-left: -8px;
|
||||
}
|
||||
.icon.arrow :global(svg) {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
|
|
|
@ -107,6 +107,7 @@
|
|||
id={`component-${component._id}`}
|
||||
>
|
||||
<NavItem
|
||||
compact
|
||||
scrollable
|
||||
draggable
|
||||
on:dragend={dndStore.actions.reset}
|
||||
|
@ -117,7 +118,7 @@
|
|||
text={getComponentText(component)}
|
||||
icon={getComponentIcon(component)}
|
||||
withArrow={componentHasChildren(component)}
|
||||
indentLevel={level + 1}
|
||||
indentLevel={level}
|
||||
selected={$store.selectedComponentId === component._id}
|
||||
{opened}
|
||||
highlighted={isChildOfSelectedComponent(component)}
|
||||
|
|
Loading…
Reference in New Issue