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

[EuiCallout] Text color is inherited from EuiBottomBar #4811

Closed
pickypg opened this issue May 18, 2021 · 1 comment · Fixed by #4816
Closed

[EuiCallout] Text color is inherited from EuiBottomBar #4811

pickypg opened this issue May 18, 2021 · 1 comment · Fixed by #4816

Comments

@pickypg
Copy link
Member

pickypg commented May 18, 2021

While placing an error closest to the relevant buttons, the EuiCallout displaying the error was practically unreadable in dark mode:

image

This is impacting EUI version 34.0.0 (and earlier; we're on 32.0.4): https://codesandbox.io/s/wonderful-cloud-s3q62?file=/index.js

For anyone running into this issue, it can be worked around:

<EuiTextColor color="default"><p>...</p></EuiTextColor>
@cchaos
Copy link
Contributor

cchaos commented May 19, 2021

👋 Thanks for the find @pickypg. I think the solution here is to add the color="default" prop to the EuiText wrapper of the children. This will is also the best way to ensure proper contrast in case the callout is placed in any other container with a specific text color.

Relevant code:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants