@iro/toast
v1.0.4
Published
A toast component implemented based on Svelte.
Downloads
7
Readme
Toast
A toast component implemented based on Svelte.
Usage
install
pnpm i @iro/toast
svelte
import {Toast, toast} from '@iro/toast'
// +page.svelte
<button on:click={() => toast.show('Wow!!!')}>toast</button>
// +layout.svelte
<Toast/>
<Toast --color="white" --background-color="green" --icon-size="20px" auto={false}/>
<Toast --color="white" --background-color="green" --icon-size="20px" closeable={false} --icon-color="yellow"/>