<!-- FIXME: deal with this mess in style property. You can't do all that right in your HTML -->

<script>
    export let image = "";
    export let onclick;
    export let color = "var(--col_text_panel)";
    export let size = "25px";

</script>

<!-- FIXME: You horrible son of a goose-->
<input class={"icon " + (onclick ? "clickable" : "")} type="button" value="" 
style="--image: url({image}); --color: {color}; background-color: {color}; --size: {size};" 
on:click={onclick ? onclick : null}>

<style>
    .icon {
        background-color: var(--color);
        object-fit: contain;
        -webkit-mask-image: var(--image);
        mask-image: var(--image);
        mask-repeat: no-repeat;
        mask-size: contain;
        height: var(--size);
        width: var(--size);
    }

    .clickable {
        cursor: pointer;
    }
    .clickable:hover {
        background-color: var(--col_text_hint) !important;
    }
</style>