Fixed toasts not working.

This commit is contained in:
2023-09-18 13:02:55 +01:00
parent 8b9a2ac8d5
commit f31f180687
8 changed files with 47 additions and 106 deletions

View File

@ -1,10 +1,26 @@
class Toast {
constructor(text: String, type: String, dismissable: boolean, timeout: number ) {
id = text
/**
* @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: String;
type: String;
dismissible: boolean;
id: number = 0;
text: String;
type: ToastType;
dismissable: Boolean;
timeout: number;
}