Only show index if swatch exists

main
kts of kettek 2024-02-22 01:01:11 -08:00
parent 6a89cc4aeb
commit 917bf91060
1 changed files with 5 additions and 1 deletions

View File

@ -34,7 +34,11 @@
<main> <main>
<div class="color" style="background-color: rgba({red},{green},{blue},{alpha})"> <div class="color" style="background-color: rgba({red},{green},{blue},{alpha})">
<div class="label" style="color: rgb({255-red}, {255-green}, {255-blue})">{index}</div> <div class="label" style="color: rgb({255-red}, {255-green}, {255-blue})">
{#if swatchExists}
{index}
{/if}
</div>
</div> </div>
<Button kind="ghost" size="small" disabled={swatchExists} iconDescription="replace swatch" tooltipPosition="top" icon={ColorSwitch} on:click={replaceSwatch}></Button> <Button kind="ghost" size="small" disabled={swatchExists} iconDescription="replace swatch" tooltipPosition="top" icon={ColorSwitch} on:click={replaceSwatch}></Button>
<Button kind="ghost" size="small" disabled={swatchExists} iconDescription="add swatch" tooltipPosition="top" icon={AddLarge} on:click={addSwatch}></Button> <Button kind="ghost" size="small" disabled={swatchExists} iconDescription="add swatch" tooltipPosition="top" icon={AddLarge} on:click={addSwatch}></Button>