sui_notifications v0.8.0
Notifications usage
--at the top level file App.svelte import {Notifications, nStore, createNote} from 'sui_notifications';
notificationStore has the following statuses: 'ok', 'info', 'alert', 'error'; But any other statuses allowed, but corresponding css classes must be created customised like .notif-ok, notif-error Every status may have personal display duration, set in createNote. If it's better to set different durations to different type of notifications, it's better to use obj like { 'error':4000, 'alert':4000, 'ok': 3000 }
Usage case:
<button
on:click={
()=>nStore.add(
createNote("It's OK", "ok", 7000)
)>
Notification OK with 7sec duration
</button>
Also you can clear all notifications:
nStore.clear()
or remove notification by it's id
nStore.remove(id)