From d27ecaaa776374e9fb3ee5e552e9bc7187aa826c Mon Sep 17 00:00:00 2001 From: Kshitij Kotasthane Date: Tue, 13 Oct 2020 23:00:45 +0300 Subject: [PATCH] [EuiIcon] Fix color prop for custom colors (#4104) * Add fully mono support for EuiIcon custom color, change css property from fill to color --- CHANGELOG.md | 8 ++++++-- src-docs/src/views/icon/icon_colors.js | 17 ++++++++++++++--- .../icon/__snapshots__/icon.test.tsx.snap | 16 ++++++++-------- src/components/icon/_icon.scss | 3 ++- src/components/icon/icon.tsx | 3 ++- 5 files changed, 32 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad264bae2a4..a134fb3f4ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ - Added `plus` and `minus` glyphs to `EuiIcon` ([#4111](https://github.com/elastic/eui/pull/4111)) +**Bug fixes** + +- Fixed custom color render of `EuiIcon` app (two-tone) icons ([#4104](https://github.com/elastic/eui/pull/4104)) + + ## [`29.4.0`](https://github.com/elastic/eui/tree/v29.4.0) - Added `childrenBetween` prop to `EuiInMemoryTable` to add content between search bar and table ([#4103](https://github.com/elastic/eui/pull/4103)) @@ -14,7 +19,6 @@ - Fixed `EuiFieldSearch` padding when `isClearable` but has no `value` ([#4089](https://github.com/elastic/eui/pull/4089)) - ## [`29.3.0`](https://github.com/elastic/eui/tree/v29.3.0) - Added `both` option to `flush` prop of `EuiButtonEmpty` ([#4084](https://github.com/elastic/eui/pull/4084)) @@ -255,7 +259,7 @@ - Added `listId` to `EuiSelectableSearch` - `options` passed into `EuiSelectable` cannot have an `id` - Requires an `onChange` to be passed into `EuiSelectableSearch` - + ## [`26.3.4`](https://github.com/elastic/eui/tree/v26.3.4) **Note: this release is a backport containing changes originally made in `27.2.0`** diff --git a/src-docs/src/views/icon/icon_colors.js b/src-docs/src/views/icon/icon_colors.js index d1ab6faac30..cdca18c7af8 100644 --- a/src-docs/src/views/icon/icon_colors.js +++ b/src-docs/src/views/icon/icon_colors.js @@ -72,7 +72,7 @@ export default () => ( - + @@ -82,7 +82,7 @@ export default () => ( - + @@ -93,7 +93,7 @@ export default () => ( - + @@ -104,6 +104,17 @@ export default () => ( + + + + +

+ Special: a custom color makes{' '} + App icons fully that color +

+
+
+
); diff --git a/src/components/icon/__snapshots__/icon.test.tsx.snap b/src/components/icon/__snapshots__/icon.test.tsx.snap index 8493e158e60..9cf1ffe3993 100644 --- a/src/components/icon/__snapshots__/icon.test.tsx.snap +++ b/src/components/icon/__snapshots__/icon.test.tsx.snap @@ -21,11 +21,11 @@ exports[`EuiIcon is rendered 1`] = ` exports[`EuiIcon props color #885522 is rendered 1`] = `