MCPcopy Index your code
hub / github.com/figma/plugin-samples / displayQuestions

Function displayQuestions

trivia/code.ts:146–158  ·  view source on GitHub ↗
(triviaResponse: TriviaResponse)

Source from the content-addressed store, hash-verified

144}
145
146function displayQuestions(triviaResponse: TriviaResponse) {
147 const frame = figma.createFrame()
148 frame.fills = []
149 for (const result of triviaResponse.results) {
150 const resultFrame = displaySingleQuestion(result)
151 frame.appendChild(resultFrame)
152 frame.layoutGrow = 1
153 }
154 frame.layoutMode = "VERTICAL"
155 frame.primaryAxisSizingMode = 'AUTO'
156 frame.counterAxisSizingMode = 'AUTO'
157 frame.itemSpacing = 50
158}
159
160function displaySingleQuestion(triviaResult: TriviaResult) {
161 const frame = figma.createFrame()

Callers 1

startUIFunction · 0.85

Calls 1

displaySingleQuestionFunction · 0.85

Tested by

no test coverage detected