UNPKG

@aotearoan/neon

Version:

Neon is a lightweight design library of Vue 3 components with minimal dependencies.

41 lines (40 loc) 1.26 kB
import type { NeonAlertMessage } from '../models/NeonAlertMessage'; import { NeonAlertLevel } from '../enums/NeonAlertLevel'; /** * NeonAlertService is a service for sending alerts to the <strong>NeonAlert</strong> component for display to the user. */ export declare class NeonAlertService { /** * Send an info message. * * @param alert The info message to display. */ static info(alert: NeonAlertMessage): void; /** * Send a success message. * * @param alert The success message to display. */ static success(alert: NeonAlertMessage): void; /** * Send a warning message. * * @param alert The warning message to display. */ static warn(alert: NeonAlertMessage): void; /** * Send an error message. * * @param alert The error message to display. */ static error(alert: NeonAlertMessage): 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; }