tool strip button, execute current command

This commit is contained in:
Jan Prochazka
2022-02-17 10:53:47 +01:00
parent 1b4bc427e3
commit 6a7afeff53
5 changed files with 124 additions and 12 deletions

View File

@@ -5,7 +5,6 @@
export let disabled = false;
export let icon = null;
export let title = null;
export let externalImage = null;
const dispatch = createEventDispatcher();
@@ -17,12 +16,8 @@
<div class="button" class:disabled {title}>
<div class="inner" class:disabled on:click={handleClick}>
{#if externalImage}
<img src={externalImage} />
{:else}
<span class="icon" class:disabled><FontIcon {icon} /></span>
<slot />
{/if}
<span class="icon" class:disabled><FontIcon {icon} /></span>
<slot />
</div>
</div>
@@ -63,8 +58,4 @@
border-radius: 4px;
cursor: pointer;
}
img {
width: 20px;
height: 20px;
}
</style>