@larva.io/webcomponents
Version:
Fentrica SmartUnits WebComponents package
29 lines (26 loc) • 1.05 kB
JavaScript
/*!
* (C) Fentrica http://fentrica.com - Seee LICENSE.md
*/
import { a as assignComponentProps } from './helpers-ue25B_tw.js';
import { g as getAppRoot } from './theme-B02IfvGX.js';
async function createNotify(opts) {
if (typeof customElements !== 'undefined') {
await customElements.whenDefined('lar-notify');
const element = document.createElement('lar-notify');
assignComponentProps(element, opts);
// append the overlay element to the document body
// @TODO: re-position notify from top how manuy active notfy's there are
getAppRoot(document).appendChild(element);
if (element.componentOnReady) {
await element.componentOnReady();
}
element.addEventListener('larnotifydiddismiss', () => {
element.remove();
});
return element;
}
throw new Error('WebComponents not available');
}
export { createNotify as c };
//# sourceMappingURL=notify-controller-pqp6Fz1f.js.map
//# sourceMappingURL=notify-controller-pqp6Fz1f.js.map