warnLegacyColor
Commons
stable
Emit a console.warn (once per unique kind+value pair) when a raw CSS color is passed to a color prop that expects a TIntent. Deprecated raw-color support will be removed in v3.0.0.
API
Signature
Signature TypeScript complète, extraite du fichier util.
This function is part of the v2 → v3 migration bridge. Raw color props will be removed in v3.0.0. Replace with a TIntent value or a :style binding for one-off custom colors.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- kindrequis'color' | 'bgColor'
- The prop name that received the raw color value. Included in the warning message to help consumers locate the offending usage.
- valuerequisstring
- The raw CSS color string (e.g. "#ff0080", "rgb(255,0,0)") that triggered the warning.
API
Valeur de retour
La valeur retournée par cet util.
- No return value. Logs to console once per unique kind+value combination.
Usage
Exemples
Extraits de code prêts à coller.
Emit once per unique kind+value