adds icons

This commit is contained in:
2026-06-19 07:05:54 +02:00
parent 52ca2c24f4
commit 0f7bb4b6eb
11 changed files with 88 additions and 7 deletions
+6 -6
View File
@@ -33,7 +33,7 @@
WithElementRef<HTMLAnchorAttributes> & {
variant?: ButtonVariant;
size?: ButtonSize;
end?: Component;
icon?: Component;
};
</script>
@@ -42,7 +42,7 @@
class: className,
variant = "primary",
size = "standard",
end,
icon,
ref = $bindable(null),
href = undefined,
type = "button",
@@ -65,8 +65,8 @@
{...restProps}
>
{@render children?.()}
{#if end}
{@const Icon = end}
{#if icon}
{@const Icon = icon}
<Icon/>
{/if}
</a>
@@ -81,8 +81,8 @@
{...restProps}
>
{@render children?.()}
{#if end}
{@const Icon = end}
{#if icon}
{@const Icon = icon}
<Icon/>
{/if}
</button>