UNPKG

on-codemerge

Version:

A WYSIWYG editor for on-codemerge is a user-friendly interface that allows users to edit and view their code in real time, exactly as it will appear in the final product

28 lines (27 loc) 1.16 kB
/*! on-codemerge v1.3.1 @author Pavel Kuzmin @license MIT @homepage https://s00d.github.io/on-codemerge/ @repository git+https://github.com/s00d/on-codemerge.git Copyright (c) 2026 Pavel Kuzmin - Built on 2026-07-02T13:39:17.947Z */ var d = Object.defineProperty; var s = (n, e, t) => e in n ? d(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t; var l = (n, e, t) => s(n, typeof e != "symbol" ? e + "" : e, t); import m from "../../icons/close.svg.mjs"; class u { constructor(e, t) { l(this, "element"); this.element = this.createHeader(e, t); } createHeader(e, t) { const o = document.createElement("div"); o.className = "popup-header"; const a = document.createElement("div"); a.className = "popup-header-container"; const r = document.createElement("h3"); r.className = "popup-header-title", r.textContent = e; const c = document.createElement("button"); return c.className = "close-button", c.innerHTML = m, c.addEventListener("click", t), a.appendChild(r), a.appendChild(c), o.appendChild(a), o; } getElement() { return this.element; } } export { u as PopupHeader };