eui icon indicating copy to clipboard operation
eui copied to clipboard

Pass through icon color from EuiHeaderLogo

Open ebauman opened this issue 3 years ago • 6 comments

It would be super cool to pass a color through from EuiHeaderLogo to the resultant EuiLogo. I'm new to React, so maybe this is easily done without code changes, but since iconType and iconTitle are being explicitly passed from EuiHeaderLogo, it seems easy enough to pass iconColor.

I am happy to open a PR for this if y'all are okay with that.

ebauman avatar Aug 25 '22 21:08 ebauman

I am referencing https://github.com/elastic/eui/blob/main/src/components/header/header_logo.tsx#L26-L27

ebauman avatar Aug 25 '22 21:08 ebauman

I don't think there's a super strong reason not to, but the reason why we haven't added that customization is that we expect Elastic apps to be using the Elastic logo, and other consumers to presumably use a custom logo/SVG of some sort (passed via iconType) with their own fills and colors set, instead of one of our generic icons colored via iconColor.

cee-chen avatar Aug 26 '22 15:08 cee-chen

I think it makes sense to add an iconProps prop and spread it on the EuiIcon, treating the header logo as an extension of icon

chandlerprall avatar Aug 26 '22 16:08 chandlerprall

I don't think there's a super strong reason not to, but the reason why we haven't added that customization is that we expect Elastic apps to be using the Elastic logo, and other consumers to presumably use a custom logo/SVG of some sort (passed via iconType) with their own fills and colors set, instead of one of our generic icons colored via iconColor.

This makes total sense, and I think for most folks is the way they would go. In some internal apps though, I don't intend to make a logo or spend any time on specific branding. Just a simple icon up there to make it "nice" is all I need.

ebauman avatar Aug 26 '22 16:08 ebauman

Makes sense! I think Chandler's suggestion/approach of adding a more generic iconProps obj would cover your use case as well as add even more flexibility to the logo/icon. We'd definitely be open to a PR for that if you're interested! 🙌

cee-chen avatar Aug 26 '22 17:08 cee-chen

Sounds great! I'll get to work on that and get you something soon. Thanks :)

ebauman avatar Aug 26 '22 20:08 ebauman

👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

github-actions[bot] avatar Feb 23 '23 00:02 github-actions[bot]

❌ We're automatically closing this issue due to lack of activity. Please comment if you feel this was done in error.

github-actions[bot] avatar Mar 02 '23 00:03 github-actions[bot]