16 lines
524 B
TypeScript
16 lines
524 B
TypeScript
import { BaseElement } from "../_base";
|
|
import { NotificationBubble } from "./notification-bubble";
|
|
import './notification-bubbles.less';
|
|
|
|
export class NotificationBubbles extends BaseElement {
|
|
add(text: string, type: 'log' | 'info' | 'warn' | 'error' | 'syntax-error') {
|
|
var bubble = <NotificationBubble>document.createElement("notification-bubble");
|
|
bubble.innerText = text;
|
|
bubble.classList.add(type);
|
|
this.appendChild(bubble);
|
|
}
|
|
|
|
reset() {
|
|
this.innerHTML = "";
|
|
}
|
|
} |