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

Function htmlFrame

packages/backend/src/html/htmlMain.ts:558–572  ·  view source on GitHub ↗
(
  node: SceneNode & BaseFrameMixin,
  settings: HTMLSettings,
)

Source from the content-addressed store, hash-verified

556};
557
558const htmlFrame = async (
559 node: SceneNode & BaseFrameMixin,
560 settings: HTMLSettings,
561): Promise<string> => {
562 const childrenStr = await htmlWidgetGenerator(node.children, settings);
563
564 if (node.layoutMode !== "NONE") {
565 const rowColumn = htmlAutoLayoutProps(node, settings);
566 return await htmlContainer(node, childrenStr, rowColumn, settings);
567 }
568
569 // node.layoutMode === "NONE" && node.children.length > 1
570 // children needs to be absolute
571 return await htmlContainer(node, childrenStr, [], settings);
572};
573
574// properties named propSomething always take care of ","
575// sometimes a property might not exist, so it doesn't add ","

Callers 1

convertNodeFunction · 0.85

Calls 3

htmlAutoLayoutPropsFunction · 0.90
htmlWidgetGeneratorFunction · 0.85
htmlContainerFunction · 0.85

Tested by

no test coverage detected