2021-03-29 14:54:10 +02:00
|
|
|
<script lang="typescript">
|
|
|
|
import ButtonItem from "./ButtonItem.svelte";
|
|
|
|
|
|
|
|
export let className: string;
|
|
|
|
export let icon: string;
|
2021-03-29 17:32:43 +02:00
|
|
|
export let onClick: (event: ClickEvent) => void;
|
2021-03-29 14:54:10 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
span {
|
|
|
|
display: inline-block;
|
|
|
|
width: 28px;
|
|
|
|
height: 28px;
|
|
|
|
vertical-align: -webkit-baseline-middle;
|
|
|
|
|
2021-03-29 17:32:43 +02:00
|
|
|
& > :global(svg),
|
|
|
|
& > :global(img) {
|
|
|
|
vertical-align: unset;
|
2021-03-29 14:54:10 +02:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<ButtonItem>
|
2021-03-29 17:32:43 +02:00
|
|
|
<span class={className} on:click={onClick} on:mousedown|preventDefault>
|
|
|
|
{#if icon}
|
|
|
|
{@html icon}
|
|
|
|
{/if}
|
|
|
|
</span>
|
2021-03-29 14:54:10 +02:00
|
|
|
</ButtonItem>
|