MCPcopy Index your code
hub / github.com/bernaferrari/FigmaToCode / htmlSection

Function htmlSection

packages/backend/src/html/htmlMain.ts:661–676  ·  view source on GitHub ↗
(
  node: SectionNode,
  settings: HTMLSettings,
)

Source from the content-addressed store, hash-verified

659};
660
661const htmlSection = async (
662 node: SectionNode,
663 settings: HTMLSettings,
664): Promise<string> => {
665 const childrenStr = await htmlWidgetGenerator(node.children, settings);
666 const builder = new HtmlDefaultBuilder(node, settings)
667 .size()
668 .position()
669 .applyFillsToStyle(node.fills, "background");
670
671 if (childrenStr) {
672 return `\n<div${builder.build()}>${indentString(childrenStr)}\n</div>`;
673 } else {
674 return `\n<div${builder.build()}></div>`;
675 }
676};
677
678const htmlLine = (node: LineNode, settings: HTMLSettings): string => {
679 const builder = new HtmlDefaultBuilder(node, settings)

Callers 1

convertNodeFunction · 0.85

Calls 6

indentStringFunction · 0.90
htmlWidgetGeneratorFunction · 0.85
applyFillsToStyleMethod · 0.80
positionMethod · 0.45
sizeMethod · 0.45
buildMethod · 0.45

Tested by

no test coverage detected