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

Function attrRow

packages/sdk-playground/src/main.ts:540–559  ·  view source on GitHub ↗
(name: string, val: string)

Source from the content-addressed store, hash-verified

538}
539
540function attrRow(name: string, val: string): HTMLDivElement {
541 const row = document.createElement("div");
542 row.className = "prop-row";
543 const lbl = propLabel(name);
544 lbl.style.maxWidth = "80px";
545 lbl.style.overflow = "hidden";
546 lbl.style.textOverflow = "ellipsis";
547 const inp = document.createElement("input");
548 inp.type = "text";
549 inp.className = "prop-input";
550 inp.style.flex = "1";
551 inp.value = val;
552 inp.addEventListener("blur", () => commitAttr(name, inp.value));
553 inp.addEventListener("keydown", (e) => {
554 if (e.key === "Enter") inp.blur();
555 });
556 row.appendChild(lbl);
557 row.appendChild(inp);
558 return row;
559}
560
561function commitAttr(name: string, raw: string) {
562 if (!comp || !selectedId) return;

Callers 1

appendAttributesSectionFunction · 0.85

Calls 2

propLabelFunction · 0.85
commitAttrFunction · 0.85

Tested by

no test coverage detected