-
-
Notifications
You must be signed in to change notification settings - Fork 49
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
<script lang="ts">
import { onMount } from 'svelte';
import { SvelteToast } from '@zerodevx/svelte-toast';
import type { SvelteToastOptions } from '@zerodevx/svelte-toast';
import cx from 'clsx';
import type { ClassValue } from 'clsx';
import { canUseDOM } from '../../../components/utils/exenv';
import './Toast.scss';
/**
* Classname
*/
export let className: ClassValue = '';
/**
* SvelteToastOptions
*/
export let options: SvelteToastOptions;
/**
* SvelteToastOptions target
*/
export let target: string;
// svelte toast doesn't support ssr
let mounted = false;
onMount(() => {
if (canUseDOM) {
mounted = true;
}
});
</script>
{#if mounted}
<div class={cx('toast', className)}>
<SvelteToast {options} {target} />
</div>
{/if}
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working

