Skip to content

Commit

Permalink
Merge pull request #11 from cmu-delphi/sgratzl/sidepanel
Browse files Browse the repository at this point in the history
fix: #10 better side panel style
  • Loading branch information
sgratzl authored Jun 16, 2021
2 parents 2def807 + a117f11 commit 96dab3d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/components/LeftMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
border-right: 1px solid grey;
display: flex;
flex-direction: column;
max-width: 20em;
}
.tree {
margin-top: 1em;
Expand Down
8 changes: 6 additions & 2 deletions src/components/tree/TreeInnerNode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@

<div class="tv_node">
<span on:click={toggleExpanded}>
<Fa icon={expanded ? faChevronDown : faChevronRight} style="width: 0.9em" />
{node.title}
<Fa icon={expanded ? faChevronDown : faChevronRight} style="width: 0.9em; margin-right: 0.5em" />
<span>
{node.title}
</span>
</span>
{#if expanded}
{#each node.datasets as child (child.title)}
Expand All @@ -40,5 +42,7 @@
}
div.tv_node > span {
cursor: pointer;
display: flex;
align-items: center;
}
</style>
8 changes: 6 additions & 2 deletions src/components/tree/TreeLeafNode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
title="click to toggle the visibility of this dataset"
uk-tooltip="pos: right"
>
<Fa icon={selected ? faEye : faEyeSlash} {color} style="width: 1em" />
{node.title}
<Fa icon={selected ? faEye : faEyeSlash} {color} style="width: 1em; margin-right: 0.5em" />
<span>
{node.title}
</span>
</div>

<style>
Expand All @@ -34,6 +36,8 @@
cursor: pointer;
opacity: 0.8;
transition: opacity 0.125s ease-in-out;
display: flex;
align-items: center;
}
div.tv_node.selected {
opacity: 1;
Expand Down

0 comments on commit 96dab3d

Please sign in to comment.