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

Function getStructTemplate

packages/backend/src/swiftui/swiftuiMain.ts:15–20  ·  view source on GitHub ↗
(name: string, injectCode: string)

Source from the content-addressed store, hash-verified

13let previousExecutionCache: string[];
14
15const getStructTemplate = (name: string, injectCode: string): string =>
16 `struct ${name}: View {
17 var body: some View {
18 ${indentString(injectCode, 4).trimStart()};
19 }
20}`;
21
22const getPreviewTemplate = (name: string, injectCode: string): string =>
23 `import SwiftUI

Callers 1

swiftuiMainFunction · 0.85

Calls 1

indentStringFunction · 0.90

Tested by

no test coverage detected