diff --git a/changelogs/upcoming/7570.md b/changelogs/upcoming/7570.md index 34eabdf6a03..6bae0eb2032 100644 --- a/changelogs/upcoming/7570.md +++ b/changelogs/upcoming/7570.md @@ -1,3 +1,3 @@ -**Breaking changes** +**Deprecations** -- Renamed `euiPalettePositive` and `euiPaletteNegative` to a more culturally inclusive `euiPaletteGreen` and `euiPaletteRed` ([#7570](https://github.com/elastic/eui/pull/7570)) \ No newline at end of file +- Deprecated `euiPalettePositive` and `euiPaletteNegative` in favour of a more culturally inclusive `euiPaletteGreen` and `euiPaletteRed` ([#7570](https://github.com/elastic/eui/pull/7570)) \ No newline at end of file diff --git a/src/services/color/eui_palettes.ts b/src/services/color/eui_palettes.ts index c44a3bbfb0a..94fd3f10f3f 100644 --- a/src/services/color/eui_palettes.ts +++ b/src/services/color/eui_palettes.ts @@ -203,6 +203,10 @@ export const euiPaletteRed = function (steps: number): EuiPalette { return euiPalette(['white', redColor], steps); }; +/** + * @deprecated - use `euiPaletteRed` instead + */ +export const euiPaletteNegative = euiPaletteRed; export const euiPaletteGreen = function (steps: number): EuiPalette { if (steps === 1) { @@ -212,6 +216,11 @@ export const euiPaletteGreen = function (steps: number): EuiPalette { return euiPalette(['white', greenColor], steps); }; +/** + * @deprecated - use `euiPaletteGreen` instead + */ +export const euiPalettePositive = euiPaletteGreen; + export const euiPaletteCool = function (steps: number): EuiPalette { if (steps === 1) { return [coolArray[1]]; diff --git a/src/services/color/index.ts b/src/services/color/index.ts index 574c5ffb0b7..803f0f81a46 100644 --- a/src/services/color/index.ts +++ b/src/services/color/index.ts @@ -33,6 +33,8 @@ export { euiPaletteComplementary, euiPaletteRed, euiPaletteGreen, + euiPaletteNegative, + euiPalettePositive, euiPaletteCool, euiPaletteWarm, euiPaletteGray, diff --git a/src/services/index.ts b/src/services/index.ts index a8501828e8c..4816f7235bf 100644 --- a/src/services/index.ts +++ b/src/services/index.ts @@ -40,6 +40,8 @@ export { euiPaletteGray, euiPaletteRed, euiPaletteGreen, + euiPalettePositive, + euiPaletteNegative, euiPaletteWarm, getSteppedGradient, hexToHsv,