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

ActionList styles set an svg style, which overwrites child Icon styles #11788

Open
pt8o opened this issue Mar 26, 2024 · 0 comments
Open

ActionList styles set an svg style, which overwrites child Icon styles #11788

pt8o opened this issue Mar 26, 2024 · 0 comments
Labels
Bug Something is broken and not working as intended in the system. untriaged

Comments

@pt8o
Copy link
Contributor

pt8o commented Mar 26, 2024

Summary

Screenshot 2024-03-26 at 12 30 32

In the screenshot above, the "Disconnect" icon corresponds to this entry in the items array passed to ActionList:

{
   content: "Disconnect",
   onAction: () => {},
   prefix: <Icon source={DeleteIcon} tone="critical" />,
},

So the icon should be critical (red). But you can see in the styles that its fill colour is determined by the .Polaris-ActionList__Prefix svg rule, which forces the fill to be the default icon colour.

Steps to reproduce

Using an <ActionList />, make one of the list items use an <Icon /> with a tone other than default as its prefix.

Are you using React components?

Yes

Polaris version number

12.22.1

Browser

Chrome

Device

MacOS

@pt8o pt8o added Bug Something is broken and not working as intended in the system. untriaged labels Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken and not working as intended in the system. untriaged
Projects
None yet
Development

No branches or pull requests

1 participant