mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Fix lint errors
This commit is contained in:
parent
958599ed09
commit
0c98a68528
3 changed files with 9 additions and 6 deletions
|
@ -76,7 +76,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
onDestroy(() => {
|
||||
window.removeEventListener("resize", resizeEvent);
|
||||
unsubscribe();
|
||||
destroyToast(toast);
|
||||
destroyToast(toast!);
|
||||
});
|
||||
|
||||
const resizeEvent = () => {
|
||||
|
|
|
@ -8,17 +8,17 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
import { mdiClose } from "$lib/components/icons";
|
||||
import type { ToastProps } from "./types";
|
||||
|
||||
let { showToast, type, message }: ToastProps = $props();
|
||||
const props: ToastProps = $props();
|
||||
|
||||
const closeToast = () => {
|
||||
showToast = false;
|
||||
props.showToast = false;
|
||||
};
|
||||
</script>
|
||||
|
||||
{#if showToast}
|
||||
{#if props.showToast}
|
||||
<div class="toast-container desktop-only">
|
||||
<div class="toast {type === 'success' ? 'success' : 'error'}">
|
||||
{message}
|
||||
<div class="toast {props.type === 'success' ? 'success' : 'error'}">
|
||||
{props.message}
|
||||
<IconButton iconSize={96} on:click={closeToast} class="toast-icon">
|
||||
<Icon icon={mdiClose} />
|
||||
</IconButton>
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright: Ankitects Pty Ltd and contributors
|
||||
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
import { mount, unmount } from "svelte";
|
||||
import Toast from "./Toast.svelte";
|
||||
import type { ToastProps } from "./types";
|
||||
|
|
Loading…
Reference in a new issue