cordis/client/webapp/elements/overlay-error-message.ts
2021-10-30 12:26:41 -05:00

17 lines
572 B
TypeScript

import BaseElements from './require/base-elements.js';
import IState from './require/elements-state.js';
import { $, $$, $$$, $$$$ } from './require/q-module';
export default function createErrorMessageOverlay(state: IState, title: string, message: string): HTMLElement {
const { document } = state;
$.setDocument(document);
return BaseElements.createOverlay(document, {
class: 'content error-message', content: [
{ class: 'title', content: title },
{ class: 'message', content: message }
]
});
}