adds tests
This commit is contained in:
@@ -8,7 +8,8 @@
|
||||
export let large: boolean = false;
|
||||
export let loading: boolean = false;
|
||||
export let disabled: boolean = false;
|
||||
export let tooltip: string = "";
|
||||
export let tooltip: string | undefined = undefined;
|
||||
export let id: string | undefined = undefined
|
||||
</script>
|
||||
|
||||
<button
|
||||
@@ -18,10 +19,11 @@
|
||||
class:btn-large={large}
|
||||
class:btn-disabled={disabled || loading}
|
||||
disabled={disabled || loading}
|
||||
class:tooltip={tooltip.length > 0}
|
||||
class:tooltip={(tooltip?.length ?? 0) > 0}
|
||||
data-title={tooltip}
|
||||
on:click
|
||||
{type}
|
||||
{id}
|
||||
>
|
||||
<div class:invisible={loading}>
|
||||
{#if icon}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<button class="btn-secondary" on:click={closeModal}
|
||||
>{$_("cancel")}</button
|
||||
>
|
||||
<button class={action === "delete" ? "btn-danger" : "btn-primary"} type="button" on:click={confirm} name="delete"
|
||||
<button id="confirm" class={action === "delete" ? "btn-danger" : "btn-primary"} type="button" on:click={confirm} name="delete"
|
||||
>{$_(action)}</button
|
||||
>
|
||||
</div></Modal
|
||||
|
||||
Reference in New Issue
Block a user