MCPcopy Create free account
hub / github.com/adobe/react-spectrum / compileValue

Function compileValue

packages/@react-spectrum/s2/style/style-macro.ts:525–539  ·  view source on GitHub ↗
(
    property: string,
    themeProperty: string,
    value: StyleValue<Value, Condition<T>, any>
  )

Source from the content-addressed store, hash-verified

523 };
524
525 function compileValue(
526 property: string,
527 themeProperty: string,
528 value: StyleValue<Value, Condition<T>, any>
529 ) {
530 return conditionalToRules(
531 value as any,
532 0,
533 new Set(),
534 new Set(),
535 (value, priority, conditions, skipConditions) => {
536 return compileRule(property, themeProperty, value, priority, conditions, skipConditions);
537 }
538 );
539 }
540
541 function conditionalToRules<P extends CustomValue | any[]>(
542 value: PropertyValueDefinition<P>,

Callers 1

createThemeFunction · 0.70

Calls 2

conditionalToRulesFunction · 0.70
compileRuleFunction · 0.70

Tested by

no test coverage detected