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

[EuiIcon] Fix color prop for custom colors #4104

Merged
merged 6 commits into from
Oct 13, 2020

Conversation

thefaded
Copy link
Contributor

@thefaded thefaded commented Oct 4, 2020

Summary

Fixes #4093
Add fully mono color support for EuiIcon when custom color prop is provided. Changed CSS property from fill to color because under the hood all CSS classes uses variable currentColor, so there's no any reason to provide fill, because it will be inherited from color. Absolutely the same primary from namedColors – they're provide color.

Checklist

  • Check against all themes for compatibility in both light and dark modes
  • Checked in mobile
  • Checked in Chrome, Safari, Edge, and Firefox
  • Props have proper autodocs
  • Added documentation
  • [ ] Checked Code Sandbox works for the any docs examples
  • Added or updated jest tests
  • [ ] Checked for breaking changes and labeled appropriately
  • Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

@kibanamachine
Copy link

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@cchaos
Copy link
Contributor

cchaos commented Oct 5, 2020

Jenkins, test this

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_4104/

Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @thefaded ! Just a couple extra suggestions but the solution works great.

src/components/icon/icon.tsx Outdated Show resolved Hide resolved
src/components/icon/icon.tsx Show resolved Hide resolved
src-docs/src/views/icon/icon_colors.js Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
@cchaos
Copy link
Contributor

cchaos commented Oct 12, 2020

Jenkins, test this

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_4104/

Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks @thefaded ! LGTM, but your CL is now out of sync with master. Can you rebase and move your CL entry to the Bug fixes before the latest version?

@cchaos
Copy link
Contributor

cchaos commented Oct 13, 2020

Jenkins, test this

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_4104/

@cchaos cchaos merged commit 0b59d83 into elastic:master Oct 13, 2020
kshitij86 added a commit to kshitij86/eui that referenced this pull request Nov 29, 2020
* Add fully mono support for EuiIcon custom color, change css property from fill to color
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[EuiIcon] Multi-color app icons don't respect custom color strings
3 participants