Fix Icon behaviour with empty clickhandler

Signed-off-by: Sebastian Martinez <sebastinez@me.com>
Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
Sebastian Martinez
2022-02-05 21:05:22 +01:00
committed by Alexis Sellier
parent 9a91e53619
commit 02a0ed4664
6 changed files with 31 additions and 29 deletions
@@ -73,7 +73,8 @@
<p class="bold">{path}</p>
<span class="diff-type created">created</span>
</div>
<Icon class="clickable" clickHandler={() => dispatch("browse", path)} name="browse" width={20} inline fill />
<Icon class="clickable" name="browse" width={20} inline fill
on:click={() => dispatch("browse", path)} />
</header>
{/each}
{#each diff.deleted as path (path)}
@@ -82,7 +83,8 @@
<p class="bold">{path}</p>
<span class="diff-type deleted">deleted</span>
</div>
<Icon class="clickable" clickHandler={() => dispatch("browse", path)} name="browse" width={20} inline fill />
<Icon class="clickable" name="browse" width={20} inline fill
on:click={() => dispatch("browse", path)} />
</header>
{/each}
</div>
@@ -3,7 +3,7 @@
import Icon from "@app/Icon.svelte";
import { lineNumberL, lineNumberR, lineSign } from "@app/diff";
import type { FileDiff } from "@app/diff";
const dispatch = createEventDispatcher();
export let file: FileDiff;
@@ -109,10 +109,10 @@
<header
on:click={collapse}>
<div class="actions">
<Icon clickHandler={collapse} name="chevron" width={20} inline fill />
<Icon name="chevron" width={20} inline fill />
<p class="bold file-path">{file.path}</p>
</div>
<Icon clickHandler={() => dispatch("browse", file.path)} name="browse" width={20} inline fill />
<Icon name="browse" width={20} inline fill on:click={() => dispatch("browse", file.path)} />
</header>
{#if !collapsed}
<main>