mirror of https://github.com/cupcakearmy/ora.git
8 lines
191 B
JavaScript
8 lines
191 B
JavaScript
|
import { writable } from 'svelte/store'
|
||
|
|
||
|
export const toasts = writable([])
|
||
|
|
||
|
export function notify(message, type = 'success') {
|
||
|
toasts.update((toasts) => [...toasts, { message, type }])
|
||
|
}
|