jb-notification
Version:
notification web component
2 lines • 1.26 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).JBNotificationWrapper={})}(this,(function(e){var t=class extends HTMLElement{constructor(){super(),this.initWebComponent()}initWebComponent(){const e=this.attachShadow({mode:"open"}),t=document.createElement("template");t.innerHTML='<style>.jb-notification-wrapper-web-component{position:var(--jb-notification-wrapper-position, absolute);box-sizing:border-box;overflow:hidden;display:flex;align-items:center;flex-direction:column;gap:.5rem;width:100vw;height:100vh;padding-top:var(--jb-notification-wrapper-padding-top, 64px);z-index:9999;top:0;left:0;pointer-events:none}</style>\n\n <div class="jb-notification-wrapper-web-component">\n <slot></slot>\n </div>\n ',e.appendChild(t.content.cloneNode(!0))}static get observedAttributes(){return["x-position","y-position"]}attributeChangedCallback(e,t,n){this.onAttributeChange(e,n)}onAttributeChange(e,t){e}};!customElements.get("jb-notification-wrapper")&&window.customElements.define("jb-notification-wrapper",t),e.JBNotificationWrapperWebComponent=t}));
//# sourceMappingURL=jb-notification-wrapper.umd.js.map