Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed EuiText color of EuiCallout #4816

Merged
merged 2 commits into from
May 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

**Bug fixes**

- Fixed `EuiText` color of `EuiCallout` to `default` ([#4816](https://github.com/elastic/eui/pull/4816))
- Fixed inconsistent width of `EuiRange` and `EuiDualRange` with custom tick values ([#4781](https://github.com/elastic/eui/pull/4781))
- Fixes browser freezing when `EuiDataGrid` is used together with `EuiFlyout` and the user clicks a cell ([4813](https://github.com/elastic/eui/pull/4813))
- Added `flex-shrink: 0` to `EuiTabs`, `EuiSpacer`, and `EuiImage` to fix possible shrunken heights ([#4793](https://github.com/elastic/eui/pull/4793))
Expand Down
12 changes: 10 additions & 2 deletions src/components/call_out/__snapshots__/call_out.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ exports[`EuiCallOut is rendered 1`] = `
<div
class="euiText euiText--small"
>
Content
<div
class="euiTextColor euiTextColor--default"
>
Content
</div>
</div>
</div>
`;
Expand Down Expand Up @@ -102,7 +106,11 @@ exports[`EuiCallOut props title is rendered 1`] = `
<div
class="euiText euiText--small"
>
Content
<div
class="euiTextColor euiTextColor--default"
>
Content
</div>
</div>
</div>
`;
12 changes: 10 additions & 2 deletions src/components/call_out/call_out.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,17 @@ export const EuiCallOut = forwardRef<HTMLDivElement, EuiCallOutProps>(

let optionalChildren;
if (children && size === 's') {
optionalChildren = <EuiText size="xs">{children}</EuiText>;
optionalChildren = (
<EuiText size="xs" color="default">
{children}
</EuiText>
);
} else if (children) {
optionalChildren = <EuiText size="s">{children}</EuiText>;
optionalChildren = (
<EuiText size="s" color="default">
{children}
</EuiText>
);
}

const H: any = heading ? `${heading}` : 'span';
Expand Down
58 changes: 33 additions & 25 deletions src/components/form/__snapshots__/form.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,26 @@ exports[`EuiForm renders with error callout when isInvalid is "true" and has mul
<div
class="euiText euiText--small"
>
<ul>
<li
class="euiForm__error"
>
<span>
This is one error
</span>
</li>
<li
class="euiForm__error"
>
<span>
This is another error
</span>
</li>
</ul>
<div
class="euiTextColor euiTextColor--default"
>
<ul>
<li
class="euiForm__error"
>
<span>
This is one error
</span>
</li>
<li
class="euiForm__error"
>
<span>
This is another error
</span>
</li>
</ul>
</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -110,15 +114,19 @@ exports[`EuiForm renders with error callout when isInvalid is "true" and has one
<div
class="euiText euiText--small"
>
<ul>
<li
class="euiForm__error"
>
<span>
This is one error
</span>
</li>
</ul>
<div
class="euiTextColor euiTextColor--default"
>
<ul>
<li
class="euiForm__error"
>
<span>
This is one error
</span>
</li>
</ul>
</div>
</div>
</div>
</div>
Expand Down