minor button refactor

This commit is contained in:
axel 2025-04-11 22:34:28 +02:00
parent 58477f579e
commit 5e02851a20

View File

@ -44,17 +44,15 @@
{#if Icon} {#if Icon}
<Icon class={children ? "mr-2" : ""}></Icon> <Icon class={children ? "mr-2" : ""}></Icon>
{/if} {/if}
{#if children}
{@render children()} {@render children?.()}
{/if}
</a> </a>
{:else} {:else}
<button class={fullClasses} {...others}> <button class={fullClasses} {...others}>
{#if Icon} {#if Icon}
<Icon class={children ? "mr-2" : ""}></Icon> <Icon class={children ? "mr-2" : ""}></Icon>
{/if} {/if}
{#if children}
{@render children()} {@render children?.()}
{/if}
</button> </button>
{/if} {/if}