MCPcopy Create free account
hub / github.com/ecomfe/tempad-dev / applyTextFields

Function applyTextFields

packages/extension/utils/variable-output.ts:232–244  ·  view source on GitHub ↗
(
  style: Record<string, string>,
  node: TextNode,
  context: VariableProjectionContext,
  format: VariableFormatter,
  readers: FigmaLookupReaders
)

Source from the content-addressed store, hash-verified

230}
231
232function applyTextFields(
233 style: Record<string, string>,
234 node: TextNode,
235 context: VariableProjectionContext,
236 format: VariableFormatter,
237 readers: FigmaLookupReaders
238): void {
239 for (const [field, props] of Object.entries(TEXT_VARIABLE_STYLE_PROPS)) {
240 const id = resolveTextNodeVariableId(node, field as VariableBindableTextField, readers)
241 if (!id) continue
242 applyVariableToProps(style, props, id, context, format, readers)
243 }
244}
245
246function applyVariableToProps(
247 style: Record<string, string>,

Callers 1

applyVariableStyleFunction · 0.85

Calls 2

applyVariableToPropsFunction · 0.85

Tested by

no test coverage detected