Make button color configurable
In preparation for disk reset button
This commit is contained in:
parent
236863a0b0
commit
0a5ceaf9ea
@ -3,11 +3,13 @@
|
|||||||
export let clickHandler = null;
|
export let clickHandler = null;
|
||||||
export let rightClickHandler = null;
|
export let rightClickHandler = null;
|
||||||
export let buttonTooltip = null;
|
export let buttonTooltip = null;
|
||||||
|
export let bgColor = "bg-neutral-700";
|
||||||
|
export let hoverColor = "hover:bg-neutral-500"
|
||||||
export let buttonImage = null;
|
export let buttonImage = null;
|
||||||
export let buttonText;
|
export let buttonText;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<a href={clickUrl} target="_blank" on:click={clickHandler} on:contextmenu={rightClickHandler}><p class="flex flex-row items-center bg-neutral-700 p-2 rounded-md shadow-md shadow-neutral-900 {(clickUrl != null || clickHandler != null) ? "hover:bg-neutral-500 cursor-pointer" : ""}" title={buttonTooltip}>
|
<a href={clickUrl} target="_blank" on:click={clickHandler} on:contextmenu={rightClickHandler}><p class="flex flex-row items-center {bgColor} p-2 rounded-md shadow-md shadow-neutral-900 {(clickUrl != null || clickHandler != null) ? `${hoverColor} cursor-pointer` : ""}" title={buttonTooltip}>
|
||||||
{#if buttonImage}
|
{#if buttonImage}
|
||||||
<img src={buttonImage} class="inline w-8 h-8"/>
|
<img src={buttonImage} class="inline w-8 h-8"/>
|
||||||
{/if}
|
{/if}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user