@aotearoan/neon
Version:
Neon is a lightweight design library of Vue 3 components with minimal dependencies.
42 lines (41 loc) • 1.24 kB
TypeScript
import type { NeonToastMessage } from '../models/NeonToastMessage';
import { NeonAlertLevel } from '../enums/NeonAlertLevel';
/**
* NeonToastService is a service for sending toast alerts to the <strong>NeonAlert</strong> component for display to the
* user.
*/
export declare class NeonToastService {
/**
* Send an info message.
*
* @param toast Info toast message.
*/
static info(toast: NeonToastMessage): void;
/**
* Send a success message.
*
* @param toast Success toast message.
*/
static success(toast: NeonToastMessage): void;
/**
* Send a warning message.
*
* @param toast Warning toast message.
*/
static warn(toast: NeonToastMessage): void;
/**
* Send an error message.
*
* @param toast Error toast message.
*/
static error(toast: NeonToastMessage): void;
/**
* Generate an event key so that all events are published on the correct topic.
*
* @param eventType Alert level of the event
*
* @returns The event key for sending a message on <a href="/utils/NeonEventBus">NeonEventBus</a>.
*/
static generateEventKey(eventType: NeonAlertLevel): string;
private static emit;
}