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
|
||||
|
||||
@@ -117,6 +117,7 @@
|
||||
error={$errors.password}
|
||||
></TextField>
|
||||
<Button
|
||||
id="submit"
|
||||
primary={true}
|
||||
extraClasses={"min-w-full"}
|
||||
type="submit"
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
<h4 class="text-xl text-red-400 font-medium">
|
||||
{$_("danger-zone")}
|
||||
</h4>
|
||||
<button class="btn-danger" on:click={openConfirmModal}
|
||||
<button id="delete-account" class="btn-danger" on:click={openConfirmModal}
|
||||
>{$_("delete-account")}</button
|
||||
>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user