Files
luke-else.co.uk/src/lib/toast.ts
2025-02-01 13:00:02 +00:00

26 lines
544 B
TypeScript

/**
* @enum Used to refer to the type of toast being displayed
*/
export enum ToastType {
Info = "info",
Success = "success",
Error = "error"
}
/**
* @class Toast Notification
*/
export class Toast {
constructor(text: String, type: ToastType, dismissable: boolean, timeout: number ) {
this.text = text;
this.type = type;
this.dismissable = dismissable;
this.timeout = timeout;
}
id: number = 0;
text: String;
type: ToastType;
dismissable: Boolean;
timeout: number;
}