rework routing
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
import { onMount } from 'svelte';
|
||||
import { slide } from 'svelte/transition';
|
||||
|
||||
export let message;
|
||||
export let slideDuration = 150;
|
||||
let animationClass = "";
|
||||
|
||||
export function shake() {
|
||||
@ -10,9 +10,6 @@
|
||||
window.setTimeout(() => animationClass = "", 400);
|
||||
}
|
||||
|
||||
// onMount(() => {
|
||||
// shake();
|
||||
// });
|
||||
</script>
|
||||
|
||||
|
||||
@ -52,9 +49,17 @@
|
||||
</style>
|
||||
|
||||
|
||||
<div transition:slide="{{duration: 150}}" class="alert alert-error shadow-lg {animationClass}">
|
||||
<div>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="stroke-current flex-shrink-0 h-6 w-6" fill="none" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
|
||||
<span>{message}</span>
|
||||
</div>
|
||||
<div transition:slide="{{duration: slideDuration}}" class="alert alert-error shadow-lg {animationClass}">
|
||||
<div>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="stroke-current flex-shrink-0 h-6 w-6" fill="none" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
|
||||
<span>
|
||||
<slot name="message"></slot>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{#if $$slots.buttons}
|
||||
<div>
|
||||
<slot name="buttons"></slot>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user