Skip to content

pantoken-root / packages/core/src / resolveValue

Funzione: resolveValue() ​

resolveValue(raw): string

Beta

Risolvi un valore di token grezzo: un riferimento diventa var(...); un valore concreto viene trasmesso così com'è.

Parametri ​

raw ​

string

Restituisce ​

string

Esempio ​

ts
import { resolveValue } from "@pantoken/core";

resolveValue("{semantic.color.background.base}"); // → "var(--instui-color-background-base)"
resolveValue("#ffffff");                          // → "#ffffff"