eui
eui copied to clipboard
Pass through icon color from EuiHeaderLogo
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.
I am referencing https://github.com/elastic/eui/blob/main/src/components/header/header_logo.tsx#L26-L27
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.
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
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 viaiconColor.
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.
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! 🙌
Sounds great! I'll get to work on that and get you something soon. Thanks :)
👋 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.
❌ We're automatically closing this issue due to lack of activity. Please comment if you feel this was done in error.