mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 11:16:01 +00:00
auto close snackbar
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
onMount(() => {
|
||||
if (autoClose) setTimeout(handleClose, 3000);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<div class="wrapper">
|
||||
@@ -37,7 +36,15 @@
|
||||
<div class="buttons">
|
||||
{#each buttons as button}
|
||||
<div class="button">
|
||||
<FormStyledButton value={button.label} on:click={button.onClick} />
|
||||
<FormStyledButton
|
||||
value={button.label}
|
||||
on:click={() => {
|
||||
if (button.autoClose) {
|
||||
handleClose();
|
||||
}
|
||||
button.onClick?.();
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
@@ -76,5 +83,4 @@
|
||||
.button {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user