Came up with some crazy (retarded) solutions for dynamically styling the icons. Temporary, obviously

This commit is contained in:
2024-08-05 11:47:03 +03:00
parent d7e54e21e1
commit dda1407381
4 changed files with 8 additions and 6 deletions

View File

@@ -5,9 +5,11 @@
export let onclick;
export let color = "var(--col_text_panel)";
export let size = "25px";
</script>
<input class="icon" type="button" value=""
<!-- 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}>
@@ -27,6 +29,6 @@ on:click={onclick ? onclick : null}>
cursor: pointer;
}
.clickable:hover {
background-color: var(--col_text_hint);
background-color: var(--col_text_hint) !important;
}
</style>