adds icons
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user