UNPKG

@dfinity/gix-components

Version:
14 lines (13 loc) 518 B
/// <reference types="svelte" /> import type { ToastLevel, ToastMsg } from "../types/toast"; import { type Readable } from "svelte/store"; export interface ToastsStore extends Readable<ToastMsg[]> { show: (msg: Partial<Pick<ToastMsg, "id">> & Omit<ToastMsg, "id">) => symbol; hide: (idToHide: symbol) => void; update: (params: { id: symbol; content: Partial<Omit<ToastMsg, "id">>; }) => void; reset: (levels?: ToastLevel[]) => void; } export declare const toastsStore: ToastsStore;