fix(icon): forward fill prop to path elements in ExternalLink and Dow…#1670
fix(icon): forward fill prop to path elements in ExternalLink and Dow…#1670PARTH-TUSSLE wants to merge 3 commits into
Conversation
…nload icons Signed-off-by: Parth Gartan <parthgartan26feb@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request updates the DownloadIcon and ExternalLinkIcon components to use DEFAULT_FILL_NONE as their default fill value and applies the fill prop directly to the inner <path> elements. The feedback suggests updating DownloadIcon to forward all remaining SVG props using the rest parameter (...props) to ensure consistency with ExternalLinkIcon and prevent other standard SVG attributes from being ignored.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Signed-off-by: Parth Gartan <parthgartan26feb@gmail.com>
|
@banana-three-join , @Bhumikagarggg , @saurabhraghuvanshii , would appreciate a review whenever you get the time. |
|
@PARTH-TUSSLE Thanks for working on this and also LGTM |
NSTKrishna
left a comment
There was a problem hiding this comment.
@PARTH-TUSSLE also check if there are any other icons in the library that still use a hardcoded fill or don't forward fill to their path elements
Aightt! |
@NSTKrishna I've checked the rest of the library! Most of the standard UI icons correctly inherit fill (either explicitly or via spreading ...props to the root svg). However, there are a few monochrome/UI icons that hardcode Keppel Green (#00B39F) and completely ignore props.fill, specifically: MergeActionIcon, ModifiedApplicationFileIcon, and OriginalApplicationFileIcon. ChallengesIcon and AlertIcon also hardcode specific hexes. (The multi-colored brand logos like Google, SMP, and MesheryOperator also hardcode their fills, but that seems intentional). Should I fix the MergeActionIcon and ApplicationFile icons to forward fill in a separate PR, or add it to this one? |
create a separate pr for those and before making any changes, verify that the hardcoded fills aren't intentional |
Notes for Reviewers
This PR resolves an inconsistency in
ExternalLinkIconandDownloadIconwhere they did not support or forward thefillprop correctly to their underlying<path>elements.Root Cause / Changes
Standard Sistent icons (like
AddIconandFileUploadIcon) destructurefill = DEFAULT_FILL_NONE("currentColor") and apply it to their<path>tags, enabling containers (like buttons) to dynamically color them.However:
ExternalLinkIcon(Externallink.tsx): Completely omittedfillfrom destructuring and did not pass it to<path />.DownloadIcon(Download.tsx): Destructured a hardcoded defaultfill = '#455a64'and applied it to<svg>instead of<path />.Changes made in this PR:
fill = DEFAULT_FILL_NONEfrom their props.fillattribute directly to the<path>elements of both icons.This PR fixes #1669 and meshery/meshery#20065
Signed commits