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

Function buildSetStyleSection

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

Source from the content-addressed store, hash-verified

750}
751
752function buildSetStyleSection(): HTMLDivElement {
753 const colorInput = mkInput("#f43f5e", "#f43f5e");
754 colorInput.style.width = "100px";
755 const setColor = mkBtn("Headline color", "primary", () => {
756 if (!needSelection()) return;
757 comp!.setStyle(selectedId!, { color: colorInput.value });
758 logEntry("op", { setStyle: { id: selectedId, color: colorInput.value } });
759 });
760 const bold = mkBtn("Bold", "", () =>
761 comp!.setStyle(selectedId ?? "hf-headline", { fontWeight: "700" }),
762 );
763 const reset = mkBtn("Reset weight", "", () =>
764 comp!.setStyle(selectedId ?? "hf-headline", { fontWeight: null }),
765 );
766 return opSection("setStyle", opRow(colorInput, setColor), opRow(bold, reset));
767}
768
769function buildSetTextSection(): HTMLDivElement {
770 const textInput = mkInput("new text", "");

Callers

nothing calls this directly

Calls 7

mkInputFunction · 0.85
mkBtnFunction · 0.85
needSelectionFunction · 0.85
logEntryFunction · 0.85
opSectionFunction · 0.85
opRowFunction · 0.85
setStyleMethod · 0.65

Tested by

no test coverage detected