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
Full TypeScript signature sourced from the util file.
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
Parameters
Input parameters accepted by this util.
- kindrequired'color' | 'bgColor'
- The prop name that received the raw color value. Included in the warning message to help consumers locate the offending usage.
- valuerequiredstring
- The raw CSS color string (e.g. "#ff0080", "rgb(255,0,0)") that triggered the warning.
API
Return value
The value returned by this util.
- No return value. Logs to console once per unique kind+value combination.
Usage
Examples
Ready-to-paste usage snippets.
Emit once per unique kind+value