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

Function tailwindSection

packages/backend/src/tailwind/tailwindMain.ts:319–333  ·  view source on GitHub ↗
(
  node: SectionNode,
  settings: TailwindSettings,
)

Source from the content-addressed store, hash-verified

317};
318
319export const tailwindSection = async (
320 node: SectionNode,
321 settings: TailwindSettings,
322): Promise<string> => {
323 const childrenStr = await tailwindWidgetGenerator(node.children, settings);
324 const builder = new TailwindDefaultBuilder(node, settings)
325 .size()
326 .position()
327 .customColor(node.fills, "bg");
328
329 const build = builder.build();
330 return childrenStr
331 ? `\n<div${build}>${indentString(childrenStr)}\n</div>`
332 : `\n<div${build}></div>`;
333};
334
335export const tailwindCodeGenTextStyles = (): string => {
336 if (previousExecutionCache.length === 0) {

Callers 1

convertNodeFunction · 0.85

Calls 6

indentStringFunction · 0.90
tailwindWidgetGeneratorFunction · 0.85
customColorMethod · 0.80
positionMethod · 0.45
sizeMethod · 0.45
buildMethod · 0.45

Tested by

no test coverage detected