Update the button to not take a handler function and just bubble the click event

This commit is contained in:
Oliver-Akins 2021-12-24 03:18:25 -07:00
parent ba093cdfa7
commit 4bdbe8f231

View file

@ -2,7 +2,6 @@
export let height: string|number = "50px"; export let height: string|number = "50px";
export let width: string|number = "unset"; export let width: string|number = "unset";
export let background: string = "#00aa00"; export let background: string = "#00aa00";
export let handler: (e: Event) => unknown;
export let hoverBackground: string = "transparent"; export let hoverBackground: string = "transparent";
export let classes: string = ""; export let classes: string = "";
export let title: string = ""; export let title: string = "";
@ -46,7 +45,7 @@ $: if (typeof(width) == "string") {
<button <button
class="clickable" class="clickable"
{title} {title}
on:click|trusted|stopPropagation={handler} on:click|trusted|stopPropagation
> >
<slot></slot> <slot></slot>
</button> </button>