(
style: Record<string, string>,
node: SceneNode,
context: VariableProjectionContext,
format: VariableFormatter,
readers: FigmaLookupReaders,
options: VariableStyleOptions = {}
)
| 65 | } |
| 66 | |
| 67 | function applyVariableStyle( |
| 68 | style: Record<string, string>, |
| 69 | node: SceneNode, |
| 70 | context: VariableProjectionContext, |
| 71 | format: VariableFormatter, |
| 72 | readers: FigmaLookupReaders, |
| 73 | options: VariableStyleOptions = {} |
| 74 | ): Record<string, string> { |
| 75 | const next = { ...style } |
| 76 | const replacements = buildReplacementMap(context, format) |
| 77 | |
| 78 | rewriteKnownCodeSyntaxValues(next, context, format) |
| 79 | rewriteInlineVars(next, replacements, options) |
| 80 | applyBoundFields(next, node, NODE_VARIABLE_STYLE_PROPS, context, format, readers) |
| 81 | |
| 82 | if (node.type === 'TEXT') { |
| 83 | applyTextFields(next, node, context, format, readers) |
| 84 | } |
| 85 | |
| 86 | return next |
| 87 | } |
| 88 | |
| 89 | function getCssExprForCodeSyntaxVariable(variable: Variable): string | null { |
| 90 | return getVariableCodeSyntax(variable) ? getVariableCssExpr(variable) : null |
no test coverage detected