adds tests

This commit is contained in:
Christian Beutel
2025-01-21 14:37:52 +01:00
parent c40e01d56c
commit 7571f6e9b9
10 changed files with 66 additions and 6 deletions

View File

@@ -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}

View File

@@ -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