import XNode from "../../core/XNode"; import styled from "../../style/styled"; import { PopupWindow } from "./PopupService"; const css = styled.css ` padding: 5px; font-size: larger; & .error { color: red; border-color: red; } & .warning { background-color: lightyellow; } `.installLocal(); export default function NotificationPopup({ message, type }): typeof PopupWindow { return class Notification extends PopupWindow { public create(): void { if(message instanceof XNode) { this.render(
{ message }
); return; } this.render(
); } }; }