feat: add toasts
This commit is contained in:
parent
1a7186061a
commit
87e6e2809e
3 changed files with 55 additions and 0 deletions
13
frontend/src/lib/components/Toast.svelte
Normal file
13
frontend/src/lib/components/Toast.svelte
Normal file
|
@ -0,0 +1,13 @@
|
|||
<script lang="ts">
|
||||
import { Toast } from "sveltestrap";
|
||||
|
||||
export let header: string | undefined = undefined;
|
||||
export let body: string;
|
||||
|
||||
let isOpen = true;
|
||||
const toggle = () => (isOpen = !isOpen);
|
||||
</script>
|
||||
|
||||
<Toast {isOpen} {header} body class="m-3" {toggle}>
|
||||
{body}
|
||||
</Toast>
|
Loading…
Add table
Add a link
Reference in a new issue