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

Function buildLabelSection

packages/sdk-playground/src/main.ts:838–852  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

836}
837
838function buildLabelSection(): HTMLDivElement {
839 const name = mkInput("label", "midpoint");
840 name.style.width = "100px";
841 const pos = mkNumInput("pos", "1.5");
842 const add = mkBtn("Add", "primary", () => {
843 const labelName = name.value.trim();
844 comp!.dispatch({ type: "addLabel", name: labelName, position: parseFloat(pos.value) });
845 logEntry("op", { addLabel: { name: labelName, position: pos.value } });
846 });
847 const remove = mkBtn("Remove", "danger", () => {
848 comp!.dispatch({ type: "removeLabel", name: name.value.trim() });
849 logEntry("op", { removeLabel: name.value.trim() });
850 });
851 return opSection("addLabel / removeLabel", opRow(name, pos, add, remove));
852}
853
854function buildClassStyleSection(): HTMLDivElement {
855 const sel = mkInput("selector", ".badge");

Callers

nothing calls this directly

Calls 7

mkInputFunction · 0.85
mkNumInputFunction · 0.85
mkBtnFunction · 0.85
logEntryFunction · 0.85
opSectionFunction · 0.85
opRowFunction · 0.85
dispatchMethod · 0.65

Tested by

no test coverage detected