MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / buildSelectControl

Function buildSelectControl

packages/sdk-playground/src/main.ts:441–453  ·  view source on GitHub ↗
(row: HTMLElement, prop: string, currentVal: string, options: string[])

Source from the content-addressed store, hash-verified

439}
440
441function buildSelectControl(row: HTMLElement, prop: string, currentVal: string, options: string[]) {
442 const sel = document.createElement("select");
443 sel.className = "prop-input";
444 for (const opt of options) {
445 const o = document.createElement("option");
446 o.value = opt;
447 o.textContent = opt;
448 if (opt === currentVal) o.selected = true;
449 sel.appendChild(o);
450 }
451 sel.addEventListener("change", () => commitStyle(prop, sel.value || null));
452 row.appendChild(sel);
453}
454
455function buildTextControl(
456 row: HTMLElement,

Callers 1

makeStyleRowFunction · 0.85

Calls 1

commitStyleFunction · 0.85

Tested by

no test coverage detected