From 926836e6002927829a1ef8833900cbf5e872df53 Mon Sep 17 00:00:00 2001
From: miukimiu
Date: Mon, 26 Apr 2021 20:20:10 +0100
Subject: [PATCH 01/10] Making app icons to inherit parent color when nested in
specific components
---
CHANGELOG.md | 1 +
.../badge/__snapshots__/badge.test.tsx.snap | 3 +
src/components/badge/badge.tsx | 2 +
.../badge/beta_badge/beta_badge.tsx | 1 +
.../collapsed_item_actions.test.tsx.snap | 1 +
.../in_memory_table.test.tsx.snap | 6 ++
.../button/__snapshots__/button.test.tsx.snap | 3 +
.../button_content.test.tsx.snap | 2 +
src/components/button/button_content.tsx | 7 +-
.../__snapshots__/button_empty.test.tsx.snap | 3 +
.../__snapshots__/button_group.test.tsx.snap | 84 +++++++++++++++++++
.../__snapshots__/button_icon.test.tsx.snap | 21 +++++
.../button/button_icon/button_icon.tsx | 1 +
src/components/call_out/call_out.tsx | 1 +
.../__snapshots__/card_select.test.tsx.snap | 1 +
.../__snapshots__/code_block.test.tsx.snap | 2 +
.../collapsible_nav.test.tsx.snap | 8 ++
.../context_menu/context_menu_item.tsx | 7 +-
.../__snapshots__/data_grid.test.tsx.snap | 39 +++++++++
.../__snapshots__/filter_button.test.tsx.snap | 1 +
.../flyout/__snapshots__/flyout.test.tsx.snap | 14 ++++
.../field_password.test.tsx.snap | 3 +
.../__snapshots__/super_select.test.tsx.snap | 6 ++
.../icon/__snapshots__/icon.test.tsx.snap | 2 +-
src/components/icon/_variables.scss | 1 +
src/components/icon/icon.tsx | 7 +-
.../__snapshots__/list_group.test.tsx.snap | 4 +
.../list_group_item.test.tsx.snap | 4 +
src/components/list_group/list_group_item.tsx | 8 +-
.../pinnable_list_group.test.tsx.snap | 12 +++
.../markdown_editor.test.tsx.snap | 55 ++++++++++++
.../__snapshots__/confirm_modal.test.tsx.snap | 2 +
.../modal/__snapshots__/modal.test.tsx.snap | 1 +
.../notification_event.test.tsx.snap | 2 +
...tification_event_read_button.test.tsx.snap | 2 +
.../__snapshots__/pagination.test.tsx.snap | 2 +
.../selectable_list_item.test.tsx.snap | 1 +
.../__snapshots__/side_nav.test.tsx.snap | 8 ++
.../__snapshots__/suggest_item.test.tsx.snap | 5 ++
src/components/suggest/suggest_item.tsx | 5 +-
.../table_sort_mobile.test.tsx.snap | 1 +
.../table_sort_mobile_item.test.tsx.snap | 1 +
.../table_pagination.test.tsx.snap | 5 ++
43 files changed, 338 insertions(+), 7 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 30837482d3b..6e87ff16db2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,7 @@
**Bug fixes**
- Fixed missing i18n tokens for `EuiFilePicker` ([#4750](https://github.com/elastic/eui/pull/4750))
+- Fixed a bug in `EuiIcon` where app icons were getting two-tone colors when nested in specific components ([#4750](https://github.com/elastic/eui/pull/4750))
## [`32.2.0`](https://github.com/elastic/eui/tree/v32.2.0)
diff --git a/src/components/badge/__snapshots__/badge.test.tsx.snap b/src/components/badge/__snapshots__/badge.test.tsx.snap
index bd6e2b78737..86874c2eaef 100644
--- a/src/components/badge/__snapshots__/badge.test.tsx.snap
+++ b/src/components/badge/__snapshots__/badge.test.tsx.snap
@@ -309,6 +309,7 @@ exports[`EuiBadge props iconSide left is rendered 1`] = `
@@ -330,6 +331,7 @@ exports[`EuiBadge props iconSide right is rendered 1`] = `
@@ -351,6 +353,7 @@ exports[`EuiBadge props iconType is rendered 1`] = `
diff --git a/src/components/badge/badge.tsx b/src/components/badge/badge.tsx
index 424777cb8f0..c38091a37d9 100644
--- a/src/components/badge/badge.tsx
+++ b/src/components/badge/badge.tsx
@@ -261,6 +261,7 @@ export const EuiBadge: FunctionComponent = ({
size="s"
{...closeButtonProps}
className={closeClassNames}
+ color="default" // forces app icons to inherit de parent color
/>
);
@@ -270,6 +271,7 @@ export const EuiBadge: FunctionComponent = ({
type={iconType}
size={children ? 's' : 'm'}
className="euiBadge__icon"
+ color="default" // forces app icons to inherit de parent color
/>
);
}
diff --git a/src/components/badge/beta_badge/beta_badge.tsx b/src/components/badge/beta_badge/beta_badge.tsx
index 295efb4baaf..abf8eb85087 100644
--- a/src/components/badge/beta_badge/beta_badge.tsx
+++ b/src/components/badge/beta_badge/beta_badge.tsx
@@ -103,6 +103,7 @@ export const EuiBetaBadge: FunctionComponent = ({
type={iconType}
size="m"
aria-hidden="true"
+ color="default" // forces app icons to inherit de parent color
/>
);
}
diff --git a/src/components/basic_table/__snapshots__/collapsed_item_actions.test.tsx.snap b/src/components/basic_table/__snapshots__/collapsed_item_actions.test.tsx.snap
index 40a0fae8a90..3eb101a179f 100644
--- a/src/components/basic_table/__snapshots__/collapsed_item_actions.test.tsx.snap
+++ b/src/components/basic_table/__snapshots__/collapsed_item_actions.test.tsx.snap
@@ -20,6 +20,7 @@ exports[`CollapsedItemActions render 1`] = `
diff --git a/src/components/basic_table/__snapshots__/in_memory_table.test.tsx.snap b/src/components/basic_table/__snapshots__/in_memory_table.test.tsx.snap
index 5e4f2a166d4..daab988517a 100644
--- a/src/components/basic_table/__snapshots__/in_memory_table.test.tsx.snap
+++ b/src/components/basic_table/__snapshots__/in_memory_table.test.tsx.snap
@@ -394,11 +394,13 @@ exports[`EuiInMemoryTable behavior pagination 1`] = `
>
@@ -473,12 +475,14 @@ exports[`EuiInMemoryTable behavior pagination 1`] = `
@@ -685,12 +689,14 @@ exports[`EuiInMemoryTable behavior pagination 1`] = `
diff --git a/src/components/button/__snapshots__/button.test.tsx.snap b/src/components/button/__snapshots__/button.test.tsx.snap
index fe417604d3f..2669f617cdb 100644
--- a/src/components/button/__snapshots__/button.test.tsx.snap
+++ b/src/components/button/__snapshots__/button.test.tsx.snap
@@ -185,6 +185,7 @@ exports[`EuiButton props iconSide left is rendered 1`] = `
>
@@ -38,6 +39,7 @@ exports[`EuiButtonContent props iconType is rendered 1`] = `
>
diff --git a/src/components/button/button_content.tsx b/src/components/button/button_content.tsx
index 525f1b8dc17..187419df59c 100644
--- a/src/components/button/button_content.tsx
+++ b/src/components/button/button_content.tsx
@@ -79,7 +79,12 @@ export const EuiButtonContent: FunctionComponent<
);
} else if (iconType) {
buttonIcon = (
-
+
);
}
diff --git a/src/components/button/button_empty/__snapshots__/button_empty.test.tsx.snap b/src/components/button/button_empty/__snapshots__/button_empty.test.tsx.snap
index 75b3d5d0257..f833d7eed95 100644
--- a/src/components/button/button_empty/__snapshots__/button_empty.test.tsx.snap
+++ b/src/components/button/button_empty/__snapshots__/button_empty.test.tsx.snap
@@ -200,6 +200,7 @@ exports[`EuiButtonEmpty props iconSide left is rendered 1`] = `
>
@@ -24,6 +25,7 @@ exports[`EuiButtonIcon props color accent is rendered 1`] = `
@@ -38,6 +40,7 @@ exports[`EuiButtonIcon props color danger is rendered 1`] = `
@@ -52,6 +55,7 @@ exports[`EuiButtonIcon props color ghost is rendered 1`] = `
@@ -66,6 +70,7 @@ exports[`EuiButtonIcon props color primary is rendered 1`] = `
@@ -80,6 +85,7 @@ exports[`EuiButtonIcon props color subdued is rendered 1`] = `
@@ -94,6 +100,7 @@ exports[`EuiButtonIcon props color success is rendered 1`] = `
@@ -108,6 +115,7 @@ exports[`EuiButtonIcon props color text is rendered 1`] = `
@@ -122,6 +130,7 @@ exports[`EuiButtonIcon props color warning is rendered 1`] = `
@@ -136,6 +145,7 @@ exports[`EuiButtonIcon props display base is rendered 1`] = `
@@ -150,6 +160,7 @@ exports[`EuiButtonIcon props display empty is rendered 1`] = `
@@ -164,6 +175,7 @@ exports[`EuiButtonIcon props display fill is rendered 1`] = `
@@ -180,6 +192,7 @@ exports[`EuiButtonIcon props href secures the rel attribute when the target is _
@@ -194,6 +207,7 @@ exports[`EuiButtonIcon props iconType is rendered 1`] = `
@@ -209,6 +223,7 @@ exports[`EuiButtonIcon props isDisabled is rendered 1`] = `
@@ -224,6 +239,7 @@ exports[`EuiButtonIcon props isDisabled renders a button even when href is defin
@@ -239,6 +255,7 @@ exports[`EuiButtonIcon props isSelected is rendered as false 1`] = `
@@ -254,6 +271,7 @@ exports[`EuiButtonIcon props isSelected is rendered as true 1`] = `
@@ -268,6 +286,7 @@ exports[`EuiButtonIcon props size m is rendered 1`] = `
@@ -282,6 +301,7 @@ exports[`EuiButtonIcon props size s is rendered 1`] = `
@@ -296,6 +316,7 @@ exports[`EuiButtonIcon props size xs is rendered 1`] = `
diff --git a/src/components/button/button_icon/button_icon.tsx b/src/components/button/button_icon/button_icon.tsx
index e4c3f456c6e..805c38c7f7f 100644
--- a/src/components/button/button_icon/button_icon.tsx
+++ b/src/components/button/button_icon/button_icon.tsx
@@ -190,6 +190,7 @@ export const EuiButtonIcon: FunctionComponent = ({
type={iconType}
size={iconSize}
aria-hidden="true"
+ color="default" // forces app icons to inherit de parent color
/>
);
}
diff --git a/src/components/call_out/call_out.tsx b/src/components/call_out/call_out.tsx
index 05c1b738b52..951ee666fc6 100644
--- a/src/components/call_out/call_out.tsx
+++ b/src/components/call_out/call_out.tsx
@@ -84,6 +84,7 @@ export const EuiCallOut = forwardRef(
type={iconType}
size="m"
aria-hidden="true"
+ color="default" // forces app icons to inherit de parent color
/>
);
}
diff --git a/src/components/card/__snapshots__/card_select.test.tsx.snap b/src/components/card/__snapshots__/card_select.test.tsx.snap
index e582accadd9..8efba752c74 100644
--- a/src/components/card/__snapshots__/card_select.test.tsx.snap
+++ b/src/components/card/__snapshots__/card_select.test.tsx.snap
@@ -91,6 +91,7 @@ exports[`EuiCardSelect props isSelected 1`] = `
>
@@ -167,6 +168,7 @@ console.log(some);
diff --git a/src/components/collapsible_nav/__snapshots__/collapsible_nav.test.tsx.snap b/src/components/collapsible_nav/__snapshots__/collapsible_nav.test.tsx.snap
index 43e9a28299f..6138bb64aa9 100644
--- a/src/components/collapsible_nav/__snapshots__/collapsible_nav.test.tsx.snap
+++ b/src/components/collapsible_nav/__snapshots__/collapsible_nav.test.tsx.snap
@@ -59,6 +59,7 @@ Array [
>
{
switch (typeof icon) {
case 'string':
iconInstance = (
-
+
);
break;
diff --git a/src/components/datagrid/__snapshots__/data_grid.test.tsx.snap b/src/components/datagrid/__snapshots__/data_grid.test.tsx.snap
index e6012c01c02..d3b9b664104 100644
--- a/src/components/datagrid/__snapshots__/data_grid.test.tsx.snap
+++ b/src/components/datagrid/__snapshots__/data_grid.test.tsx.snap
@@ -23,6 +23,7 @@ exports[`EuiDataGrid pagination renders 1`] = `
>
@@ -116,6 +118,7 @@ exports[`EuiDataGrid pagination renders 1`] = `
@@ -155,10 +158,12 @@ exports[`EuiDataGrid render column actions renders various column actions config
>
@@ -212,10 +217,12 @@ exports[`EuiDataGrid render column actions renders various column actions config
>
@@ -293,10 +300,12 @@ exports[`EuiDataGrid render column actions renders various column actions config
>
@@ -365,10 +374,12 @@ exports[`EuiDataGrid render column actions renders various column actions config
>
@@ -413,10 +424,12 @@ exports[`EuiDataGrid render column actions renders various column actions config
>
@@ -511,10 +524,12 @@ exports[`EuiDataGrid render column actions renders various column actions config
>
@@ -592,10 +607,12 @@ exports[`EuiDataGrid render column actions renders various column actions config
>
@@ -691,10 +708,12 @@ exports[`EuiDataGrid render column actions renders various column actions config
>
@@ -730,10 +749,12 @@ exports[`EuiDataGrid render column actions renders various column actions config
>
@@ -769,10 +790,12 @@ exports[`EuiDataGrid render column actions renders various column actions config
>
@@ -807,10 +830,12 @@ exports[`EuiDataGrid render column actions renders various column actions config
>
@@ -845,10 +870,12 @@ exports[`EuiDataGrid render column actions renders various column actions config
>
@@ -933,6 +960,7 @@ Array [
>
@@ -74,6 +75,7 @@ Array [
@@ -146,6 +148,7 @@ Array [
@@ -189,6 +192,7 @@ Array [
@@ -231,6 +235,7 @@ Array [
@@ -274,6 +279,7 @@ Array [
@@ -317,6 +323,7 @@ Array [
@@ -359,6 +366,7 @@ Array [
@@ -401,6 +409,7 @@ Array [
@@ -443,6 +452,7 @@ Array [
@@ -485,6 +495,7 @@ Array [
@@ -527,6 +538,7 @@ Array [
@@ -569,6 +581,7 @@ Array [
@@ -611,6 +624,7 @@ Array [
diff --git a/src/components/form/field_password/__snapshots__/field_password.test.tsx.snap b/src/components/form/field_password/__snapshots__/field_password.test.tsx.snap
index 5ad961f6786..8e9a3a83cf1 100644
--- a/src/components/form/field_password/__snapshots__/field_password.test.tsx.snap
+++ b/src/components/form/field_password/__snapshots__/field_password.test.tsx.snap
@@ -112,6 +112,7 @@ exports[`EuiFieldPassword props dual dual type also renders append 1`] = `
@@ -155,6 +156,7 @@ exports[`EuiFieldPassword props dual dualToggleProps is rendered 1`] = `
@@ -336,6 +338,7 @@ exports[`EuiFieldPassword props type dual is rendered 1`] = `
diff --git a/src/components/form/super_select/__snapshots__/super_select.test.tsx.snap b/src/components/form/super_select/__snapshots__/super_select.test.tsx.snap
index 67b727bb3e9..9c0a8ed64ec 100644
--- a/src/components/form/super_select/__snapshots__/super_select.test.tsx.snap
+++ b/src/components/form/super_select/__snapshots__/super_select.test.tsx.snap
@@ -213,6 +213,7 @@ exports[`EuiSuperSelect props custom display is propagated to dropdown 1`] = `
>
{
typeof type === 'string' &&
(/.+App$/.test(type) || /.+Job$/.test(type) || type === 'dataVisualizer');
+ // parent is not one of
+
const classes = classNames(
'euiIcon',
sizeToClassNameMap[size],
optionalColorClass,
{
- 'euiIcon--app': isAppIcon,
+ // The app icon only gets the .euiIcon--app class if no color is passed
+ 'euiIcon--app': isAppIcon && !color,
'euiIcon-isLoading': isLoading,
'euiIcon-isLoaded': !isLoading && neededLoading,
},
diff --git a/src/components/list_group/__snapshots__/list_group.test.tsx.snap b/src/components/list_group/__snapshots__/list_group.test.tsx.snap
index 71255ad552e..cdb3ad44734 100644
--- a/src/components/list_group/__snapshots__/list_group.test.tsx.snap
+++ b/src/components/list_group/__snapshots__/list_group.test.tsx.snap
@@ -20,6 +20,7 @@ exports[`EuiListGroup listItems is rendered 1`] = `
>
@@ -117,6 +119,7 @@ exports[`EuiListGroup listItems is rendered with color 1`] = `
>
diff --git a/src/components/list_group/__snapshots__/list_group_item.test.tsx.snap b/src/components/list_group/__snapshots__/list_group_item.test.tsx.snap
index bd8575d76ef..c12b987664e 100644
--- a/src/components/list_group/__snapshots__/list_group_item.test.tsx.snap
+++ b/src/components/list_group/__snapshots__/list_group_item.test.tsx.snap
@@ -124,6 +124,7 @@ exports[`EuiListGroupItem props extraAction can be disabled 1`] = `
@@ -152,6 +153,7 @@ exports[`EuiListGroupItem props extraAction is rendered 1`] = `
@@ -242,6 +244,7 @@ exports[`EuiListGroupItem props iconType is rendered 1`] = `
>
= ({
let iconNode;
if (iconType) {
- iconNode = ;
+ iconNode = (
+
+ );
if (icon) {
console.warn(
diff --git a/src/components/list_group/pinnable_list_group/__snapshots__/pinnable_list_group.test.tsx.snap b/src/components/list_group/pinnable_list_group/__snapshots__/pinnable_list_group.test.tsx.snap
index b76b4ec00e2..34dc20aad01 100644
--- a/src/components/list_group/pinnable_list_group/__snapshots__/pinnable_list_group.test.tsx.snap
+++ b/src/components/list_group/pinnable_list_group/__snapshots__/pinnable_list_group.test.tsx.snap
@@ -14,6 +14,7 @@ exports[`EuiPinnableListGroup can have custom pin icon titles 1`] = `
>
@@ -57,6 +59,7 @@ exports[`EuiPinnableListGroup can have custom pin icon titles 1`] = `
@@ -85,6 +88,7 @@ exports[`EuiPinnableListGroup can have custom pin icon titles 1`] = `
@@ -112,6 +116,7 @@ exports[`EuiPinnableListGroup can have custom pin icon titles 1`] = `
@@ -140,6 +145,7 @@ exports[`EuiPinnableListGroup can have custom pin icon titles 1`] = `
@@ -177,6 +183,7 @@ exports[`EuiPinnableListGroup is rendered 1`] = `
>
@@ -220,6 +228,7 @@ exports[`EuiPinnableListGroup is rendered 1`] = `
@@ -248,6 +257,7 @@ exports[`EuiPinnableListGroup is rendered 1`] = `
@@ -275,6 +285,7 @@ exports[`EuiPinnableListGroup is rendered 1`] = `
@@ -303,6 +314,7 @@ exports[`EuiPinnableListGroup is rendered 1`] = `
diff --git a/src/components/markdown_editor/__snapshots__/markdown_editor.test.tsx.snap b/src/components/markdown_editor/__snapshots__/markdown_editor.test.tsx.snap
index b4287e13d2d..c8dfb2c18d7 100644
--- a/src/components/markdown_editor/__snapshots__/markdown_editor.test.tsx.snap
+++ b/src/components/markdown_editor/__snapshots__/markdown_editor.test.tsx.snap
@@ -22,6 +22,7 @@ exports[`EuiMarkdownEditor is rendered 1`] = `
@@ -37,6 +38,7 @@ exports[`EuiMarkdownEditor is rendered 1`] = `
@@ -55,6 +57,7 @@ exports[`EuiMarkdownEditor is rendered 1`] = `
@@ -70,6 +73,7 @@ exports[`EuiMarkdownEditor is rendered 1`] = `
@@ -85,6 +89,7 @@ exports[`EuiMarkdownEditor is rendered 1`] = `
@@ -103,6 +108,7 @@ exports[`EuiMarkdownEditor is rendered 1`] = `
@@ -118,6 +124,7 @@ exports[`EuiMarkdownEditor is rendered 1`] = `
@@ -133,6 +140,7 @@ exports[`EuiMarkdownEditor is rendered 1`] = `
@@ -151,6 +159,7 @@ exports[`EuiMarkdownEditor is rendered 1`] = `
@@ -165,6 +174,7 @@ exports[`EuiMarkdownEditor is rendered 1`] = `
>
@@ -241,6 +252,7 @@ exports[`EuiMarkdownEditor props autoExpandPreview is rendered with false 1`] =
@@ -256,6 +268,7 @@ exports[`EuiMarkdownEditor props autoExpandPreview is rendered with false 1`] =
@@ -274,6 +287,7 @@ exports[`EuiMarkdownEditor props autoExpandPreview is rendered with false 1`] =
@@ -289,6 +303,7 @@ exports[`EuiMarkdownEditor props autoExpandPreview is rendered with false 1`] =
@@ -304,6 +319,7 @@ exports[`EuiMarkdownEditor props autoExpandPreview is rendered with false 1`] =
@@ -322,6 +338,7 @@ exports[`EuiMarkdownEditor props autoExpandPreview is rendered with false 1`] =
@@ -337,6 +354,7 @@ exports[`EuiMarkdownEditor props autoExpandPreview is rendered with false 1`] =
@@ -352,6 +370,7 @@ exports[`EuiMarkdownEditor props autoExpandPreview is rendered with false 1`] =
@@ -370,6 +389,7 @@ exports[`EuiMarkdownEditor props autoExpandPreview is rendered with false 1`] =
@@ -384,6 +404,7 @@ exports[`EuiMarkdownEditor props autoExpandPreview is rendered with false 1`] =
>
@@ -460,6 +482,7 @@ exports[`EuiMarkdownEditor props height is rendered in full mode 1`] = `
@@ -475,6 +498,7 @@ exports[`EuiMarkdownEditor props height is rendered in full mode 1`] = `
@@ -493,6 +517,7 @@ exports[`EuiMarkdownEditor props height is rendered in full mode 1`] = `
@@ -508,6 +533,7 @@ exports[`EuiMarkdownEditor props height is rendered in full mode 1`] = `
@@ -523,6 +549,7 @@ exports[`EuiMarkdownEditor props height is rendered in full mode 1`] = `
@@ -541,6 +568,7 @@ exports[`EuiMarkdownEditor props height is rendered in full mode 1`] = `
@@ -556,6 +584,7 @@ exports[`EuiMarkdownEditor props height is rendered in full mode 1`] = `
@@ -571,6 +600,7 @@ exports[`EuiMarkdownEditor props height is rendered in full mode 1`] = `
@@ -589,6 +619,7 @@ exports[`EuiMarkdownEditor props height is rendered in full mode 1`] = `
@@ -603,6 +634,7 @@ exports[`EuiMarkdownEditor props height is rendered in full mode 1`] = `
>
@@ -679,6 +712,7 @@ exports[`EuiMarkdownEditor props height is rendered with a custom size 1`] = `
@@ -694,6 +728,7 @@ exports[`EuiMarkdownEditor props height is rendered with a custom size 1`] = `
@@ -712,6 +747,7 @@ exports[`EuiMarkdownEditor props height is rendered with a custom size 1`] = `
@@ -727,6 +763,7 @@ exports[`EuiMarkdownEditor props height is rendered with a custom size 1`] = `
@@ -742,6 +779,7 @@ exports[`EuiMarkdownEditor props height is rendered with a custom size 1`] = `
@@ -760,6 +798,7 @@ exports[`EuiMarkdownEditor props height is rendered with a custom size 1`] = `
@@ -775,6 +814,7 @@ exports[`EuiMarkdownEditor props height is rendered with a custom size 1`] = `
@@ -790,6 +830,7 @@ exports[`EuiMarkdownEditor props height is rendered with a custom size 1`] = `
@@ -808,6 +849,7 @@ exports[`EuiMarkdownEditor props height is rendered with a custom size 1`] = `
@@ -822,6 +864,7 @@ exports[`EuiMarkdownEditor props height is rendered with a custom size 1`] = `
>
@@ -898,6 +942,7 @@ exports[`EuiMarkdownEditor props maxHeight is rendered with a custom size 1`] =
@@ -913,6 +958,7 @@ exports[`EuiMarkdownEditor props maxHeight is rendered with a custom size 1`] =
@@ -931,6 +977,7 @@ exports[`EuiMarkdownEditor props maxHeight is rendered with a custom size 1`] =
@@ -946,6 +993,7 @@ exports[`EuiMarkdownEditor props maxHeight is rendered with a custom size 1`] =
@@ -961,6 +1009,7 @@ exports[`EuiMarkdownEditor props maxHeight is rendered with a custom size 1`] =
@@ -979,6 +1028,7 @@ exports[`EuiMarkdownEditor props maxHeight is rendered with a custom size 1`] =
@@ -994,6 +1044,7 @@ exports[`EuiMarkdownEditor props maxHeight is rendered with a custom size 1`] =
@@ -1009,6 +1060,7 @@ exports[`EuiMarkdownEditor props maxHeight is rendered with a custom size 1`] =
@@ -1027,6 +1079,7 @@ exports[`EuiMarkdownEditor props maxHeight is rendered with a custom size 1`] =
@@ -1041,6 +1094,7 @@ exports[`EuiMarkdownEditor props maxHeight is rendered with a custom size 1`] =
>
diff --git a/src/components/modal/__snapshots__/confirm_modal.test.tsx.snap b/src/components/modal/__snapshots__/confirm_modal.test.tsx.snap
index e1606316408..bd29458cbed 100644
--- a/src/components/modal/__snapshots__/confirm_modal.test.tsx.snap
+++ b/src/components/modal/__snapshots__/confirm_modal.test.tsx.snap
@@ -33,6 +33,7 @@ Array [
@@ -145,6 +146,7 @@ Array [
diff --git a/src/components/modal/__snapshots__/modal.test.tsx.snap b/src/components/modal/__snapshots__/modal.test.tsx.snap
index 58f69991d6f..73fee3a180b 100644
--- a/src/components/modal/__snapshots__/modal.test.tsx.snap
+++ b/src/components/modal/__snapshots__/modal.test.tsx.snap
@@ -33,6 +33,7 @@ Array [
diff --git a/src/components/notification/__snapshots__/notification_event.test.tsx.snap b/src/components/notification/__snapshots__/notification_event.test.tsx.snap
index 48b183b4629..95e0a952bb5 100644
--- a/src/components/notification/__snapshots__/notification_event.test.tsx.snap
+++ b/src/components/notification/__snapshots__/notification_event.test.tsx.snap
@@ -403,6 +403,7 @@ exports[`EuiNotificationEvent props isRead is rendered 1`] = `
@@ -748,6 +749,7 @@ exports[`EuiNotificationEvent props primaryActionProps is rendered 1`] = `
>
@@ -27,6 +28,7 @@ exports[`EuiNotificationEventReadButton renders isRead to false 1`] = `
diff --git a/src/components/pagination/__snapshots__/pagination.test.tsx.snap b/src/components/pagination/__snapshots__/pagination.test.tsx.snap
index b97502ca296..1e6b71099c4 100644
--- a/src/components/pagination/__snapshots__/pagination.test.tsx.snap
+++ b/src/components/pagination/__snapshots__/pagination.test.tsx.snap
@@ -15,6 +15,7 @@ exports[`EuiPagination is rendered 1`] = `
@@ -52,6 +53,7 @@ exports[`EuiPagination is rendered 1`] = `
diff --git a/src/components/selectable/selectable_list/__snapshots__/selectable_list_item.test.tsx.snap b/src/components/selectable/selectable_list/__snapshots__/selectable_list_item.test.tsx.snap
index 959f8e4dedb..b899d930ee6 100644
--- a/src/components/selectable/selectable_list/__snapshots__/selectable_list_item.test.tsx.snap
+++ b/src/components/selectable/selectable_list/__snapshots__/selectable_list_item.test.tsx.snap
@@ -140,6 +140,7 @@ exports[`EuiSelectableListItem props isFocused 1`] = `
>
diff --git a/src/components/side_nav/__snapshots__/side_nav.test.tsx.snap b/src/components/side_nav/__snapshots__/side_nav.test.tsx.snap
index 73cc96f3a23..7001685dd68 100644
--- a/src/components/side_nav/__snapshots__/side_nav.test.tsx.snap
+++ b/src/components/side_nav/__snapshots__/side_nav.test.tsx.snap
@@ -15,6 +15,7 @@ exports[`EuiSideNav is rendered 1`] = `
>
@@ -29,6 +30,7 @@ exports[`props descriptionDisplay as wrap is rendered 1`] = `
class="euiSuggestItem__type euiSuggestItem__type--tint2"
>
@@ -53,6 +55,7 @@ exports[`props item with no description has expanded label is rendered 1`] = `
class="euiSuggestItem__type euiSuggestItem__type--tint2"
>
@@ -72,6 +75,7 @@ exports[`props labelDisplay as expand is rendered 1`] = `
class="euiSuggestItem__type euiSuggestItem__type--tint2"
>
@@ -96,6 +100,7 @@ exports[`props labelWidth is 30% is rendered 1`] = `
class="euiSuggestItem__type euiSuggestItem__type--tint2"
>
diff --git a/src/components/suggest/suggest_item.tsx b/src/components/suggest/suggest_item.tsx
index 292b53595b2..44955df20b8 100644
--- a/src/components/suggest/suggest_item.tsx
+++ b/src/components/suggest/suggest_item.tsx
@@ -167,7 +167,10 @@ export const EuiSuggestItem: FunctionComponent = ({
const innerContent = (
-
+ {label}
{description && (
diff --git a/src/components/table/mobile/__snapshots__/table_sort_mobile.test.tsx.snap b/src/components/table/mobile/__snapshots__/table_sort_mobile.test.tsx.snap
index d71fd0ff744..c24a25a8a00 100644
--- a/src/components/table/mobile/__snapshots__/table_sort_mobile.test.tsx.snap
+++ b/src/components/table/mobile/__snapshots__/table_sort_mobile.test.tsx.snap
@@ -20,6 +20,7 @@ exports[`EuiTableSortMobile is rendered 1`] = `
>
@@ -171,6 +173,7 @@ exports[`EuiTablePagination is rendered 1`] = `
@@ -203,6 +206,7 @@ exports[`EuiTablePagination is rendered when hiding the per page options 1`] = `
@@ -322,6 +326,7 @@ exports[`EuiTablePagination is rendered when hiding the per page options 1`] = `
From 492000e821f554fb4eb3f98e4fc86e0d35fa3622 Mon Sep 17 00:00:00 2001
From: miukimiu
Date: Tue, 27 Apr 2021 10:47:35 +0100
Subject: [PATCH 02/10] Improving example
---
src-docs/src/views/icon/icon_colors_apps.js | 22 +++++++++++++++++++--
src-docs/src/views/icon/icon_example.js | 8 +++++---
2 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/src-docs/src/views/icon/icon_colors_apps.js b/src-docs/src/views/icon/icon_colors_apps.js
index 173dc34f9c4..72981da2670 100644
--- a/src-docs/src/views/icon/icon_colors_apps.js
+++ b/src-docs/src/views/icon/icon_colors_apps.js
@@ -32,7 +32,7 @@ export default () => (
className="eui-textCenter"
grow={false}
style={{ minWidth: 96 }}>
-
+ (
isCopyable
transparentBackground
paddingSize="m">
- {''}
+ {''}
@@ -63,6 +63,24 @@ export default () => (
+
+
+
+
+
+
+ {''}
+
+
+
+
Two-tone icons, like our app style icons, will behave similarly to
normal glyphs when provided a specific color by applying the color
- to all the shapes within.
+ to all the shapes within. Most of the time, you
+ just need to pass color="default" to force the
+ icon to inherit its color from its parent.
@@ -218,8 +220,8 @@ export const IconExample = {
The type prop can accept a valid enum, string or
React SVG Element. When using a custom SVG, please make sure it sits
- on a square canvas and preferably utilizes one of EUI's sizes
- (16x16 or 32x32).
+ on a square canvas and preferably utilizes one of EUI's sizes (
+ 16x16 or 32x32).
When using custom SVGs for simple glyphs,{' '}
From cc5cc1bd47a010d7995a508801f60d665cdc2e2a Mon Sep 17 00:00:00 2001
From: miukimiu
Date: Tue, 27 Apr 2021 11:03:03 +0100
Subject: [PATCH 03/10] CL
---
CHANGELOG.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6e87ff16db2..5850bcfb0a7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,7 +3,7 @@
**Bug fixes**
- Fixed missing i18n tokens for `EuiFilePicker` ([#4750](https://github.com/elastic/eui/pull/4750))
-- Fixed a bug in `EuiIcon` where app icons were getting two-tone colors when nested in specific components ([#4750](https://github.com/elastic/eui/pull/4750))
+- Fixed a bug in `EuiIcon` where two-tone icons were not inheriting their parent color when nested in specific components ([#4760](https://github.com/elastic/eui/pull/4760))
## [`32.2.0`](https://github.com/elastic/eui/tree/v32.2.0)
From 878e8bdd003ace4ae9e0df507bb7e579126bb5cf Mon Sep 17 00:00:00 2001
From: miukimiu
Date: Tue, 27 Apr 2021 11:07:43 +0100
Subject: [PATCH 04/10] Improving comment msg
---
src/components/badge/badge.tsx | 4 ++--
src/components/badge/beta_badge/beta_badge.tsx | 2 +-
src/components/button/button_content.tsx | 2 +-
src/components/button/button_icon/button_icon.tsx | 2 +-
src/components/call_out/call_out.tsx | 2 +-
src/components/context_menu/context_menu_item.tsx | 2 +-
src/components/list_group/list_group_item.tsx | 2 +-
src/components/suggest/suggest_item.tsx | 2 +-
8 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/components/badge/badge.tsx b/src/components/badge/badge.tsx
index c38091a37d9..c67cf072248 100644
--- a/src/components/badge/badge.tsx
+++ b/src/components/badge/badge.tsx
@@ -261,7 +261,7 @@ export const EuiBadge: FunctionComponent = ({
size="s"
{...closeButtonProps}
className={closeClassNames}
- color="default" // forces app icons to inherit de parent color
+ color="default" // forces two-tone icons to inherit their parent color
/>
);
@@ -271,7 +271,7 @@ export const EuiBadge: FunctionComponent = ({
type={iconType}
size={children ? 's' : 'm'}
className="euiBadge__icon"
- color="default" // forces app icons to inherit de parent color
+ color="default" // forces two-tone icons to inherit their parent color
/>
);
}
diff --git a/src/components/badge/beta_badge/beta_badge.tsx b/src/components/badge/beta_badge/beta_badge.tsx
index abf8eb85087..bfcac47f340 100644
--- a/src/components/badge/beta_badge/beta_badge.tsx
+++ b/src/components/badge/beta_badge/beta_badge.tsx
@@ -103,7 +103,7 @@ export const EuiBetaBadge: FunctionComponent = ({
type={iconType}
size="m"
aria-hidden="true"
- color="default" // forces app icons to inherit de parent color
+ color="default" // forces two-tone icons to inherit their parent color
/>
);
}
diff --git a/src/components/button/button_content.tsx b/src/components/button/button_content.tsx
index 187419df59c..4736bc72662 100644
--- a/src/components/button/button_content.tsx
+++ b/src/components/button/button_content.tsx
@@ -83,7 +83,7 @@ export const EuiButtonContent: FunctionComponent<
className="euiButtonContent__icon"
type={iconType}
size="m"
- color="default" // forces app icons to inherit de parent color
+ color="default" // forces two-tone icons to inherit their parent color
/>
);
}
diff --git a/src/components/button/button_icon/button_icon.tsx b/src/components/button/button_icon/button_icon.tsx
index 805c38c7f7f..8ae5c051671 100644
--- a/src/components/button/button_icon/button_icon.tsx
+++ b/src/components/button/button_icon/button_icon.tsx
@@ -190,7 +190,7 @@ export const EuiButtonIcon: FunctionComponent = ({
type={iconType}
size={iconSize}
aria-hidden="true"
- color="default" // forces app icons to inherit de parent color
+ color="default" // forces two-tone icons to inherit their parent color
/>
);
}
diff --git a/src/components/call_out/call_out.tsx b/src/components/call_out/call_out.tsx
index 951ee666fc6..99527a23d5d 100644
--- a/src/components/call_out/call_out.tsx
+++ b/src/components/call_out/call_out.tsx
@@ -84,7 +84,7 @@ export const EuiCallOut = forwardRef(
type={iconType}
size="m"
aria-hidden="true"
- color="default" // forces app icons to inherit de parent color
+ color="default" // forces two-tone icons to inherit their parent color
/>
);
}
diff --git a/src/components/context_menu/context_menu_item.tsx b/src/components/context_menu/context_menu_item.tsx
index ed039404462..2420169ca56 100644
--- a/src/components/context_menu/context_menu_item.tsx
+++ b/src/components/context_menu/context_menu_item.tsx
@@ -126,7 +126,7 @@ export class EuiContextMenuItem extends Component {
type={icon}
size="m"
className="euiContextMenu__icon"
- color="default" // forces app icons to inherit de parent color
+ color="default" // forces two-tone icons to inherit their parent color
/>
);
break;
diff --git a/src/components/list_group/list_group_item.tsx b/src/components/list_group/list_group_item.tsx
index c4b03e3646b..4908d39d30b 100644
--- a/src/components/list_group/list_group_item.tsx
+++ b/src/components/list_group/list_group_item.tsx
@@ -188,7 +188,7 @@ export const EuiListGroupItem: FunctionComponent = ({
);
diff --git a/src/components/suggest/suggest_item.tsx b/src/components/suggest/suggest_item.tsx
index 44955df20b8..9a99fcad0d4 100644
--- a/src/components/suggest/suggest_item.tsx
+++ b/src/components/suggest/suggest_item.tsx
@@ -169,7 +169,7 @@ export const EuiSuggestItem: FunctionComponent = ({
{label}
From f8dfdac4b5fea7b785d0adf13bd8025fa890afd8 Mon Sep 17 00:00:00 2001
From: miukimiu
Date: Wed, 28 Apr 2021 16:16:22 +0100
Subject: [PATCH 05/10] Adding color inherit
---
.../badge/__snapshots__/badge.test.tsx.snap | 6 +-
src/components/badge/badge.tsx | 4 +-
.../badge/beta_badge/beta_badge.tsx | 2 +-
.../collapsed_item_actions.test.tsx.snap | 2 +-
.../in_memory_table.test.tsx.snap | 12 +-
.../button/__snapshots__/button.test.tsx.snap | 6 +-
.../button_content.test.tsx.snap | 4 +-
src/components/button/button_content.tsx | 2 +-
.../__snapshots__/button_empty.test.tsx.snap | 6 +-
.../__snapshots__/button_group.test.tsx.snap | 168 +++++++++---------
.../__snapshots__/button_icon.test.tsx.snap | 42 ++---
.../button/button_icon/button_icon.tsx | 2 +-
src/components/call_out/call_out.tsx | 2 +-
.../__snapshots__/card_select.test.tsx.snap | 2 +-
.../__snapshots__/code_block.test.tsx.snap | 4 +-
.../collapsible_nav.test.tsx.snap | 16 +-
.../context_menu/context_menu_item.tsx | 2 +-
.../__snapshots__/data_grid.test.tsx.snap | 78 ++++----
.../__snapshots__/filter_button.test.tsx.snap | 2 +-
.../flyout/__snapshots__/flyout.test.tsx.snap | 28 +--
.../field_password.test.tsx.snap | 6 +-
.../__snapshots__/super_select.test.tsx.snap | 12 +-
.../health/__snapshots__/health.test.tsx.snap | 22 +++
.../icon/__snapshots__/icon.test.tsx.snap | 19 +-
src/components/icon/_variables.scss | 2 +-
src/components/icon/icon.tsx | 3 +-
.../__snapshots__/list_group.test.tsx.snap | 8 +-
.../list_group_item.test.tsx.snap | 8 +-
src/components/list_group/list_group_item.tsx | 2 +-
.../pinnable_list_group.test.tsx.snap | 24 +--
.../markdown_editor.test.tsx.snap | 110 ++++++------
.../__snapshots__/confirm_modal.test.tsx.snap | 4 +-
.../modal/__snapshots__/modal.test.tsx.snap | 2 +-
.../notification_event.test.tsx.snap | 4 +-
...tification_event_read_button.test.tsx.snap | 4 +-
.../__snapshots__/pagination.test.tsx.snap | 4 +-
.../selectable_list_item.test.tsx.snap | 2 +-
.../__snapshots__/side_nav.test.tsx.snap | 16 +-
.../__snapshots__/suggest_item.test.tsx.snap | 10 +-
src/components/suggest/suggest_item.tsx | 2 +-
.../table_sort_mobile.test.tsx.snap | 2 +-
.../table_sort_mobile_item.test.tsx.snap | 2 +-
.../table_pagination.test.tsx.snap | 10 +-
43 files changed, 354 insertions(+), 314 deletions(-)
diff --git a/src/components/badge/__snapshots__/badge.test.tsx.snap b/src/components/badge/__snapshots__/badge.test.tsx.snap
index 86874c2eaef..b4e2750db4d 100644
--- a/src/components/badge/__snapshots__/badge.test.tsx.snap
+++ b/src/components/badge/__snapshots__/badge.test.tsx.snap
@@ -309,7 +309,7 @@ exports[`EuiBadge props iconSide left is rendered 1`] = `
@@ -331,7 +331,7 @@ exports[`EuiBadge props iconSide right is rendered 1`] = `
@@ -353,7 +353,7 @@ exports[`EuiBadge props iconType is rendered 1`] = `
diff --git a/src/components/badge/badge.tsx b/src/components/badge/badge.tsx
index c67cf072248..7f7d50eb4f9 100644
--- a/src/components/badge/badge.tsx
+++ b/src/components/badge/badge.tsx
@@ -259,9 +259,9 @@ export const EuiBadge: FunctionComponent = ({
);
@@ -271,7 +271,7 @@ export const EuiBadge: FunctionComponent = ({
type={iconType}
size={children ? 's' : 'm'}
className="euiBadge__icon"
- color="default" // forces two-tone icons to inherit their parent color
+ color="inherit" // forces the icon to inherit its parent color
/>
);
}
diff --git a/src/components/badge/beta_badge/beta_badge.tsx b/src/components/badge/beta_badge/beta_badge.tsx
index bfcac47f340..76026d9b9f3 100644
--- a/src/components/badge/beta_badge/beta_badge.tsx
+++ b/src/components/badge/beta_badge/beta_badge.tsx
@@ -103,7 +103,7 @@ export const EuiBetaBadge: FunctionComponent = ({
type={iconType}
size="m"
aria-hidden="true"
- color="default" // forces two-tone icons to inherit their parent color
+ color="inherit" // forces the icon to inherit its parent color
/>
);
}
diff --git a/src/components/basic_table/__snapshots__/collapsed_item_actions.test.tsx.snap b/src/components/basic_table/__snapshots__/collapsed_item_actions.test.tsx.snap
index 3eb101a179f..4a2fae3ea4b 100644
--- a/src/components/basic_table/__snapshots__/collapsed_item_actions.test.tsx.snap
+++ b/src/components/basic_table/__snapshots__/collapsed_item_actions.test.tsx.snap
@@ -20,7 +20,7 @@ exports[`CollapsedItemActions render 1`] = `
diff --git a/src/components/basic_table/__snapshots__/in_memory_table.test.tsx.snap b/src/components/basic_table/__snapshots__/in_memory_table.test.tsx.snap
index 2fc12089a08..6773be8bf0a 100644
--- a/src/components/basic_table/__snapshots__/in_memory_table.test.tsx.snap
+++ b/src/components/basic_table/__snapshots__/in_memory_table.test.tsx.snap
@@ -395,13 +395,13 @@ exports[`EuiInMemoryTable behavior pagination 1`] = `
>
@@ -476,14 +476,14 @@ exports[`EuiInMemoryTable behavior pagination 1`] = `
@@ -692,14 +692,14 @@ exports[`EuiInMemoryTable behavior pagination 1`] = `
diff --git a/src/components/button/__snapshots__/button.test.tsx.snap b/src/components/button/__snapshots__/button.test.tsx.snap
index 2669f617cdb..044185d87c3 100644
--- a/src/components/button/__snapshots__/button.test.tsx.snap
+++ b/src/components/button/__snapshots__/button.test.tsx.snap
@@ -185,7 +185,7 @@ exports[`EuiButton props iconSide left is rendered 1`] = `
>
@@ -39,7 +39,7 @@ exports[`EuiButtonContent props iconType is rendered 1`] = `
>
diff --git a/src/components/button/button_content.tsx b/src/components/button/button_content.tsx
index cecb9ca1300..037bdec3270 100644
--- a/src/components/button/button_content.tsx
+++ b/src/components/button/button_content.tsx
@@ -85,7 +85,7 @@ export const EuiButtonContent: FunctionComponent<
className="euiButtonContent__icon"
type={iconType}
size={iconSize}
- color="default" // forces two-tone icons to inherit their parent color
+ color="inherit" // forces the icon to inherit its parent color
/>
);
}
diff --git a/src/components/button/button_empty/__snapshots__/button_empty.test.tsx.snap b/src/components/button/button_empty/__snapshots__/button_empty.test.tsx.snap
index f833d7eed95..4736340ff80 100644
--- a/src/components/button/button_empty/__snapshots__/button_empty.test.tsx.snap
+++ b/src/components/button/button_empty/__snapshots__/button_empty.test.tsx.snap
@@ -200,7 +200,7 @@ exports[`EuiButtonEmpty props iconSide left is rendered 1`] = `
>
@@ -25,7 +25,7 @@ exports[`EuiButtonIcon props color accent is rendered 1`] = `
@@ -40,7 +40,7 @@ exports[`EuiButtonIcon props color danger is rendered 1`] = `
@@ -55,7 +55,7 @@ exports[`EuiButtonIcon props color ghost is rendered 1`] = `
@@ -70,7 +70,7 @@ exports[`EuiButtonIcon props color primary is rendered 1`] = `
@@ -85,7 +85,7 @@ exports[`EuiButtonIcon props color subdued is rendered 1`] = `
@@ -100,7 +100,7 @@ exports[`EuiButtonIcon props color success is rendered 1`] = `
@@ -115,7 +115,7 @@ exports[`EuiButtonIcon props color text is rendered 1`] = `
@@ -130,7 +130,7 @@ exports[`EuiButtonIcon props color warning is rendered 1`] = `
@@ -145,7 +145,7 @@ exports[`EuiButtonIcon props display base is rendered 1`] = `
@@ -160,7 +160,7 @@ exports[`EuiButtonIcon props display empty is rendered 1`] = `
@@ -175,7 +175,7 @@ exports[`EuiButtonIcon props display fill is rendered 1`] = `
@@ -192,7 +192,7 @@ exports[`EuiButtonIcon props href secures the rel attribute when the target is _
@@ -207,7 +207,7 @@ exports[`EuiButtonIcon props iconType is rendered 1`] = `
@@ -223,7 +223,7 @@ exports[`EuiButtonIcon props isDisabled is rendered 1`] = `
@@ -239,7 +239,7 @@ exports[`EuiButtonIcon props isDisabled renders a button even when href is defin
@@ -255,7 +255,7 @@ exports[`EuiButtonIcon props isSelected is rendered as false 1`] = `
@@ -271,7 +271,7 @@ exports[`EuiButtonIcon props isSelected is rendered as true 1`] = `
@@ -286,7 +286,7 @@ exports[`EuiButtonIcon props size m is rendered 1`] = `
@@ -301,7 +301,7 @@ exports[`EuiButtonIcon props size s is rendered 1`] = `
@@ -316,7 +316,7 @@ exports[`EuiButtonIcon props size xs is rendered 1`] = `
diff --git a/src/components/button/button_icon/button_icon.tsx b/src/components/button/button_icon/button_icon.tsx
index 8ae5c051671..5d0339cf2bc 100644
--- a/src/components/button/button_icon/button_icon.tsx
+++ b/src/components/button/button_icon/button_icon.tsx
@@ -190,7 +190,7 @@ export const EuiButtonIcon: FunctionComponent = ({
type={iconType}
size={iconSize}
aria-hidden="true"
- color="default" // forces two-tone icons to inherit their parent color
+ color="inherit" // forces the icon to inherit its parent color
/>
);
}
diff --git a/src/components/call_out/call_out.tsx b/src/components/call_out/call_out.tsx
index 99527a23d5d..b42a12f491e 100644
--- a/src/components/call_out/call_out.tsx
+++ b/src/components/call_out/call_out.tsx
@@ -84,7 +84,7 @@ export const EuiCallOut = forwardRef(
type={iconType}
size="m"
aria-hidden="true"
- color="default" // forces two-tone icons to inherit their parent color
+ color="inherit" // forces the icon to inherit its parent color
/>
);
}
diff --git a/src/components/card/__snapshots__/card_select.test.tsx.snap b/src/components/card/__snapshots__/card_select.test.tsx.snap
index 8efba752c74..e09a992e541 100644
--- a/src/components/card/__snapshots__/card_select.test.tsx.snap
+++ b/src/components/card/__snapshots__/card_select.test.tsx.snap
@@ -91,7 +91,7 @@ exports[`EuiCardSelect props isSelected 1`] = `
>
@@ -168,7 +168,7 @@ console.log(some);
diff --git a/src/components/collapsible_nav/__snapshots__/collapsible_nav.test.tsx.snap b/src/components/collapsible_nav/__snapshots__/collapsible_nav.test.tsx.snap
index 6138bb64aa9..ab021c7d1a5 100644
--- a/src/components/collapsible_nav/__snapshots__/collapsible_nav.test.tsx.snap
+++ b/src/components/collapsible_nav/__snapshots__/collapsible_nav.test.tsx.snap
@@ -59,7 +59,7 @@ Array [
>
{
type={icon}
size="m"
className="euiContextMenu__icon"
- color="default" // forces two-tone icons to inherit their parent color
+ color="inherit" // forces the icon to inherit its parent color
/>
);
break;
diff --git a/src/components/datagrid/__snapshots__/data_grid.test.tsx.snap b/src/components/datagrid/__snapshots__/data_grid.test.tsx.snap
index d3b9b664104..469c1f9c2a3 100644
--- a/src/components/datagrid/__snapshots__/data_grid.test.tsx.snap
+++ b/src/components/datagrid/__snapshots__/data_grid.test.tsx.snap
@@ -23,7 +23,7 @@ exports[`EuiDataGrid pagination renders 1`] = `
>
@@ -118,7 +118,7 @@ exports[`EuiDataGrid pagination renders 1`] = `
@@ -158,12 +158,12 @@ exports[`EuiDataGrid render column actions renders various column actions config
>
@@ -217,12 +217,12 @@ exports[`EuiDataGrid render column actions renders various column actions config
>
@@ -300,12 +300,12 @@ exports[`EuiDataGrid render column actions renders various column actions config
>
@@ -374,12 +374,12 @@ exports[`EuiDataGrid render column actions renders various column actions config
>
@@ -424,12 +424,12 @@ exports[`EuiDataGrid render column actions renders various column actions config
>
@@ -524,12 +524,12 @@ exports[`EuiDataGrid render column actions renders various column actions config
>
@@ -607,12 +607,12 @@ exports[`EuiDataGrid render column actions renders various column actions config
>
@@ -708,12 +708,12 @@ exports[`EuiDataGrid render column actions renders various column actions config
>
@@ -749,12 +749,12 @@ exports[`EuiDataGrid render column actions renders various column actions config
>
@@ -790,12 +790,12 @@ exports[`EuiDataGrid render column actions renders various column actions config
>
@@ -830,12 +830,12 @@ exports[`EuiDataGrid render column actions renders various column actions config
>
@@ -870,12 +870,12 @@ exports[`EuiDataGrid render column actions renders various column actions config
>
@@ -960,7 +960,7 @@ Array [
>
@@ -75,7 +75,7 @@ Array [
@@ -148,7 +148,7 @@ Array [
@@ -192,7 +192,7 @@ Array [
@@ -235,7 +235,7 @@ Array [
@@ -279,7 +279,7 @@ Array [
@@ -323,7 +323,7 @@ Array [
@@ -366,7 +366,7 @@ Array [
@@ -409,7 +409,7 @@ Array [
@@ -452,7 +452,7 @@ Array [
@@ -495,7 +495,7 @@ Array [
@@ -538,7 +538,7 @@ Array [
@@ -581,7 +581,7 @@ Array [
@@ -624,7 +624,7 @@ Array [
diff --git a/src/components/form/field_password/__snapshots__/field_password.test.tsx.snap b/src/components/form/field_password/__snapshots__/field_password.test.tsx.snap
index 8e9a3a83cf1..68f5d12316e 100644
--- a/src/components/form/field_password/__snapshots__/field_password.test.tsx.snap
+++ b/src/components/form/field_password/__snapshots__/field_password.test.tsx.snap
@@ -112,7 +112,7 @@ exports[`EuiFieldPassword props dual dual type also renders append 1`] = `
@@ -156,7 +156,7 @@ exports[`EuiFieldPassword props dual dualToggleProps is rendered 1`] = `
@@ -338,7 +338,7 @@ exports[`EuiFieldPassword props type dual is rendered 1`] = `
diff --git a/src/components/form/super_select/__snapshots__/super_select.test.tsx.snap b/src/components/form/super_select/__snapshots__/super_select.test.tsx.snap
index 9c0a8ed64ec..732e64ac9c5 100644
--- a/src/components/form/super_select/__snapshots__/super_select.test.tsx.snap
+++ b/src/components/form/super_select/__snapshots__/super_select.test.tsx.snap
@@ -213,7 +213,7 @@ exports[`EuiSuperSelect props custom display is propagated to dropdown 1`] = `
>
`;
+exports[`EuiHealth props color inherit is rendered 1`] = `
+
+
+
+
+
+
+
+
+`;
+
exports[`EuiHealth props color primary is rendered 1`] = `
`;
+exports[`EuiIcon props color inherit is rendered 1`] = `
+
+`;
+
exports[`EuiIcon props color primary is rendered 1`] = `
Two-tone icons, like our app style icons, will behave similarly to
normal glyphs when provided a specific color by applying the color
- to all the shapes within. Most of the time, you
- just need to pass color="default" to force the
- icon to inherit its color from its parent.
+ to all the shapes within. You can force the icon
+ to match the parent's text color by passing{' '}
+ color="inherit" to the icon.